c-dns: Client hostname (or ip address if enableLookups for the connector is false)c-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 entrys-ip: The server ip addresscs(XXX): The value of header XXX from client to serversc(XXX): The value of header XXX from server to clientsc-status: The status codetime: Time the request was servedtime-taken: Time (in seconds) taken to serve the requestx-threadname: Current request thread name (can compare later with stacktraces)x-A(XXX): Pull XXX attribute from the servlet contextx-C(XXX): Pull the cookie(s) of the name XXXx-O(XXX): Pull the all response header values XXXx-R(XXX): Pull XXX attribute from the servlet requestx-S(XXX): Pull XXX attribute from the sessionx-P(...): Call request.getParameter(...) and URLencode it. Helpful to capture certain POST
parameters.x-H(authType): getAuthTypex-H(characterEncoding): getCharacterEncodingx-H(contentLength): getContentLengthx-H(locale): getLocalex-H(protocol): getProtocolx-H(remoteUser): getRemoteUserx-H(requestedSessionId): getRequestedSessionIdx-H(requestedSessionIdFromCookie): isRequestedSessionIdFromCookiex-H(requestedSessionIdValid): isRequestedSessionIdValidx-H(scheme): getSchemex-H(secure): isSecure
Log rotation can be on or off. This is dictated by the rotatable property.
For UNIX 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 and 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.
| Modifier and Type | Class and Description |
|---|---|
| protected static class | |
| protected static class | |
| private static class | |
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class | ExtendedAccessLogValve.
write a specific response header - x-O(xxx) |
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Log |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected AbstractAccessLogValve. | createLogElements()
Overrides org. Parse pattern string and create the array of AccessLogElement. |
| protected AbstractAccessLogValve. | |
| protected AbstractAccessLogValve. | |
| protected AbstractAccessLogValve. | |
| protected AbstractAccessLogValve. | |
| protected AbstractAccessLogValve. | |
| protected AbstractAccessLogValve. | |
| protected synchronized void | open()
Overrides org. Open the new log file for the date specified by |
| pack-priv static String | Returns: '-' if null. Otherwise, toString() will be called on the object and the value will be wrapped in quotes and any quotes will be escaped with 2 sets of quotes.- The value to wrap value)Wrap the incoming value with double quotes (") and escape any double quotes appearing in the value using two double quotes (""). |