org.apache.catalina.valves
public class ExtendedAccessLogValve extends AccessLogValve implements Lifecycle
c-dns
: Client hostnamec-ip
: Client ip addressbytes
: bytes servedcs-method
: request methodcs-uri
: The full uri requestedcs-uri-query
: The query stringcs-uri-stem
: The uri without query stringdate
: The date in yyyy-mm-dd format for GMTs-dns
: The server dns entry s-ip
: The server ip addresscs(XXX)
: The value of header XXX from client to serversc(XXX)
: The value of header XXX from server to client sc-status
: The status codetime
: Time the request was servedtime-taken
: Time (in seconds) taken to serve the requestx-A(XXX)
: Pull XXX attribute from the servlet context x-C(XXX)
: Pull the first cookie of the name XXX x-O(XXX)
: Pull the all response header values 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.
x-H(authType)
: getAuthType x-H(characterEncoding)
: getCharacterEncoding x-H(contentLength)
: getContentLength x-H(locale)
: getLocalex-H(protocol)
: getProtocol x-H(remoteUser)
: getRemoteUserx-H(requestedSessionId)
: getGequestedSessionIdx-H(requestedSessionIdFromCookie)
:
isRequestedSessionIdFromCookie x-H(requestedSessionIdValid)
:
isRequestedSessionIdValidx-H(scheme)
: getSchemex-H(secure)
: isSecureLog 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.
Version: $Revision: 832123 $ $Date: 2009-11-02 22:57:21 +0100 (Mon, 02 Nov 2009) $
Nested Class Summary | |
---|---|
protected class | ExtendedAccessLogValve.CookieElement |
protected static class | ExtendedAccessLogValve.DateElement |
protected class | ExtendedAccessLogValve.PatternTokenizer |
protected class | ExtendedAccessLogValve.RequestAttributeElement |
protected class | ExtendedAccessLogValve.RequestHeaderElement |
protected class | ExtendedAccessLogValve.RequestParameterElement |
protected class | ExtendedAccessLogValve.ResponseAllHeaderElement
write a specific response header - x-O(xxx) |
protected class | ExtendedAccessLogValve.ResponseHeaderElement |
protected class | ExtendedAccessLogValve.ServletContextElement |
protected class | ExtendedAccessLogValve.SessionAttributeElement |
protected static class | ExtendedAccessLogValve.TimeElement |
Field Summary | |
---|---|
protected static String | extendedAccessLogInfo
The descriptive information about this implementation. |
Method Summary | |
---|---|
protected AccessLogElement[] | createLogElements() |
protected AccessLogElement | getClientToServerElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) |
String | getInfo()
Return descriptive information about this implementation. |
protected AccessLogElement | getLogElement(String token, ExtendedAccessLogValve.PatternTokenizer tokenizer) |
protected AccessLogElement | getProxyElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) |
protected AccessLogElement | getServerToClientElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) |
protected AccessLogElement | getServletRequestElement(String parameter) |
protected AccessLogElement | getXParameterElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) |
protected void | open()
Open the new log file for the date specified by dateStamp . |
dateStamp
.