Project

General

Profile

« Previous | Next » 

Revision 2101

Added by Matt Jones about 20 years ago

Modified EventLog to eliminate the separate revision column and instead fold
that into the docid string. Log now includes read events, but need to update
the data sent there.

View differences:

EventLog.java
89 89
     * @param ipAddress the internet protocol address for the event
90 90
	 * @param principal the principal for the event (a username, etc)
91 91
	 * @param docid the identifier of the document to which the event applies
92
	 * @param revision the revision of the document to which the event applies
93 92
	 * @param event the string code for the event
94 93
     */
95 94
    public void log(String ipAddress, String principal, String docid,
96
			long revision, String event)
95
			String event)
97 96
    {
98 97
        EventLogData logData = new EventLogData(ipAddress, principal, docid,
99
                revision, event);
98
                event);
100 99
        insertLogEntry(logData);
101 100
    }
102 101
    
......
111 110
                "dd-MMM-yyyy HH:mm:ss");
112 111

  
113 112
        String insertString = "insert into access_log"
114
                + "(ip_address, principal, docid, rev, "
113
                + "(ip_address, principal, docid, "
115 114
                + "event, date_logged) "
116 115
                + "values ("
117 116
                + "'" + logData.getIpAddress() + "', " 
118 117
                + "'" + logData.getPrincipal() + "', "
119 118
                + "'" + logData.getDocid() + "', "
120
                + logData.getRevision() + ", "
121 119
                + "'" + logData.getEvent() + "', "
122 120
                + "'" + simpleDateFormat.format(new Date()) + "')"; 
123 121

  

Also available in: Unified diff