public class ClfLogRecord
extends java.lang.Object
ClfLogger
.
Log files may be parsed by calling
ClfLogRecord.parse
.Modifier and Type | Field and Description |
---|---|
int |
contentLength
The content length of the document returned to the client.
|
java.lang.String |
dleseId
If full: DLESE ID of the record returned.
|
java.lang.String |
identity
id.
|
int |
numDbRecords
Total number of records in the database
|
int |
numSearchResults
Number of search results for search requests; 0 otherwise
|
int |
rankNum
If search: rank of first result in the displayed page.
|
java.lang.String |
referrer
The referrer, but long ago was misspelled it as
the "referer" HTTP request header.
|
java.lang.String |
remoteHost
Remote host IP number.
|
java.lang.String |
remoteUser
The username as which the user has
authenticated via password protection.
|
java.util.Date |
requestDateUtc
The date and time of request, UTC (GMT) time.
|
java.lang.String |
requestString
The request line as it came from the client.
|
java.lang.String |
requestType
The DLESE request type: search/full/other.
|
java.lang.String |
serverName
The name of the server that received the request.
|
int |
serverPort
The port number of the server that received the request.
|
java.lang.String |
userAgent
The User_Agent HTTP request header, in quotes.
|
java.lang.String |
xmlString
An arbitrary string, generally XML.
|
Constructor and Description |
---|
ClfLogRecord() |
Modifier and Type | Method and Description |
---|---|
static ClfLogRecord |
parse(java.lang.String inline,
int linenum)
Creates a ClfLogRecord by parsing the specified input line.
|
java.lang.String |
toString() |
public java.lang.String remoteHost
public java.lang.String identity
public java.lang.String remoteUser
public java.util.Date requestDateUtc
public java.lang.String requestString
public int contentLength
public java.lang.String referrer
public java.lang.String userAgent
public java.lang.String serverName
public int serverPort
public java.lang.String requestType
public int numSearchResults
public int numDbRecords
public int rankNum
public java.lang.String dleseId
public java.lang.String xmlString
public java.lang.String toString()
toString
in class java.lang.Object
public static ClfLogRecord parse(java.lang.String inline, int linenum) throws LogException
int linenum = 0; BufferedReader rdr = new BufferedReader( new FileReader( inname)); while (true) { String inline = rdr.readLine(); if (inline == null) break; linenum++; ClfLogRecord rec = ClfLogRecord.parse( inline, linenum); System.out.println("\nrecord " + linenum + ":\n" + rec); } rdr.close();
LogException