An implementation of the W3c Extended Log File Format. See
http://www.w3.org/TR/WD-logfile.html for more information about the format.
The following fields are supported:
c-dns : Client hostname
c-ip : Client ip address
bytes : bytes served
cs-method : request method
cs-uri : The full uri requested
cs-uri-query : The query string
cs-uri-stem : The uri without query string
date : The date in yyyy-mm-dd format for GMT
s-dns : The server dns entry
s-ip : The server ip address
cs(XXX) : The value of header XXX from client to server
sc(XXX) : The value of header XXX from server to client
sc-status : The status code
time : Time the request was served
time-taken : Time (in seconds) taken to serve the request
x-A(XXX) : Pull XXX attribute from the servlet context
x-C(XXX) : Pull the first cookie of the name XXX
x-R(XXX) : Pull XXX attribute from the servlet request
x-S(XXX) : Pull XXX attribute from the session
x-P(...) : Call request.getParameter(...)
and URLencode it. Helpful to capture
certain POST parameters.
- For any of the x-H(...) the following method will be called from the
HttpServletRequestObject
x-H(authType) : getAuthType
x-H(characterEncoding) : getCharacterEncoding
x-H(contentLength) : getContentLength
x-H(locale) : getLocale
x-H(protocol) : getProtocol
x-H(remoteUser) : getRemoteUser
x-H(requestedSessionId) : getGequestedSessionId
x-H(requestedSessionIdFromCookie) :
isRequestedSessionIdFromCookie
x-H(requestedSessionIdValid) :
isRequestedSessionIdValid
x-H(scheme) : getScheme
x-H(secure) : isSecure
Log rotation can be on or off. This is dictated by the rotatable
property.
For UvNIX users, another field called checkExists is also
available. If set to true, the log file's existence will be checked before
each logging. This way an external log rotator can move the file
somewhere and tomcat will start with a new file.
For JMX junkies, a public method called rotate has
been made available to allow you to tell this instance to move
the existing log file to somewhere else start writing a new log file.
Conditional logging is also supported. This can be done with the
condition property.
If the value returned from ServletRequest.getAttribute(condition)
yields a non-null value. The logging will be skipped.
For extended attributes coming from a getAttribute() call,
it is you responsibility to ensure there are no newline or
control characters.
author: Tim Funk version: $Revision: 522854 $ $Date: 2007-03-27 12:10:45 +0200 (mar., 27 mars 2007) $ |