Class ExtendedAccessLogValve
java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.valves.ValveBase
org.apache.catalina.valves.AbstractAccessLogValve
org.apache.catalina.valves.AccessLogValve
org.apache.catalina.valves.ExtendedAccessLogValve
- All Implemented Interfaces:
- MBeanRegistration,- AccessLog,- Contained,- JmxEnabled,- Lifecycle,- Valve
An implementation of the W3c Extended Log File Format. See
 WD-logfile-960323
 for more information about the format. The following fields are supported:
 
- c-dns: Client hostname (or ip address if- enableLookupsfor the connector is false)
- 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-threadname: Current request thread name (can compare later with stacktraces)
- x-A(xxx): Pull xxx attribute from the servlet context
- x-C(xxx): Pull the cookie(s) 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.
- For any of the x-H(...) the following method will be called from the HttpServletRequest object
- x-H(authType): getAuthType
- x-H(characterEncoding): getCharacterEncoding
- x-H(connectionId): getConnectionId
- x-H(contentLength): getContentLength
- x-H(locale): getLocale
- x-H(protocol): getProtocol
- x-H(remoteUser): getRemoteUser
- x-H(requestedSessionId): getRequestedSessionId
- x-H(requestedSessionIdFromCookie): isRequestedSessionIdFromCookie
- x-H(requestedSessionIdValid): isRequestedSessionIdValid
- x-H(scheme): getScheme
- x-H(secure): isSecure
- Author:
- Peter Rossbach
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected static classprotected static classprotected static classprotected static classprotected static classwrite a specific response header - x-O(xxx)protected static classprotected static classprotected static classprotected static classNested classes/interfaces inherited from class org.apache.catalina.valves.AbstractAccessLogValveAbstractAccessLogValve.AccessLogElement, AbstractAccessLogValve.ByteSentElement, AbstractAccessLogValve.CachedElement, AbstractAccessLogValve.ConnectionStatusElement, AbstractAccessLogValve.DateAndTimeElement, AbstractAccessLogValve.DateFormatCache, AbstractAccessLogValve.ElapsedTimeElement, AbstractAccessLogValve.FirstByteTimeElement, AbstractAccessLogValve.HeaderElement, AbstractAccessLogValve.HostElement, AbstractAccessLogValve.HttpStatusCodeElement, AbstractAccessLogValve.IdentifierElement, AbstractAccessLogValve.LocalAddrElement, AbstractAccessLogValve.LocalServerNameElement, AbstractAccessLogValve.LogicalUserNameElement, AbstractAccessLogValve.MethodElement, AbstractAccessLogValve.PortElement, AbstractAccessLogValve.ProtocolElement, AbstractAccessLogValve.QueryElement, AbstractAccessLogValve.RemoteAddrElement, AbstractAccessLogValve.RequestElement, AbstractAccessLogValve.RequestURIElement, AbstractAccessLogValve.SessionIdElement, AbstractAccessLogValve.StringElement, AbstractAccessLogValve.ThreadNameElement, AbstractAccessLogValve.UserElementNested classes/interfaces inherited from interface org.apache.catalina.LifecycleLifecycle.SingleUse
- 
Field SummaryFields inherited from class org.apache.catalina.valves.AccessLogValvecurrentLogFile, encoding, fileDateFormat, fileDateFormatter, prefix, renameOnRotate, rotatable, suffix, writerFields inherited from class org.apache.catalina.valves.AbstractAccessLogValvecachedElements, condition, conditionIf, enabled, locale, localeName, logElements, pattern, requestAttributesEnabledFields inherited from class org.apache.catalina.valves.ValveBaseasyncSupported, container, containerLog, next, smFields inherited from interface org.apache.catalina.AccessLogPROTOCOL_ATTRIBUTE, REMOTE_ADDR_ATTRIBUTE, REMOTE_HOST_ATTRIBUTE, SERVER_NAME_ATTRIBUTE, SERVER_PORT_ATTRIBUTEFields inherited from interface org.apache.catalina.LifecycleAFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected AbstractAccessLogValve.AccessLogElement[]Parse pattern string and create the array of AccessLogElement.protected AbstractAccessLogValve.AccessLogElementprotected AbstractAccessLogValve.AccessLogElementgetLogElement(String token, ExtendedAccessLogValve.PatternTokenizer tokenizer) protected AbstractAccessLogValve.AccessLogElementprotected AbstractAccessLogValve.AccessLogElementprotected AbstractAccessLogValve.AccessLogElementgetServletRequestElement(String parameter) protected AbstractAccessLogValve.AccessLogElementprotected voidopen()Open the new log file for the date specified bydateStamp.Methods inherited from class org.apache.catalina.valves.AccessLogValvebackgroundProcess, getDirectory, getEncoding, getFileDateFormat, getMaxDays, getPrefix, getSuffix, isBuffered, isCheckExists, isRenameOnRotate, isRotatable, log, rotate, rotate, setBuffered, setCheckExists, setDirectory, setEncoding, setFileDateFormat, setMaxDays, setPrefix, setRenameOnRotate, setRotatable, setSuffix, startInternal, stopInternalMethods inherited from class org.apache.catalina.valves.AbstractAccessLogValvecreateAccessLogElement, createAccessLogElement, escapeAndAppend, escapeAndAppend, findLocale, getCondition, getConditionIf, getConditionUnless, getEnabled, getIpv6Canonical, getLocale, getMaxLogMessageBufferSize, getPattern, getRequestAttributesEnabled, invoke, log, setCondition, setConditionIf, setConditionUnless, setEnabled, setIpv6Canonical, setLocale, setMaxLogMessageBufferSize, setPattern, setRequestAttributesEnabledMethods inherited from class org.apache.catalina.valves.ValveBasegetContainer, getDomainInternal, getNext, getObjectNameKeyProperties, initInternal, isAsyncSupported, setAsyncSupported, setContainer, setNext, toStringMethods inherited from class org.apache.catalina.util.LifecycleMBeanBasedestroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregisterMethods inherited from class org.apache.catalina.util.LifecycleBaseaddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
- 
Constructor Details- 
ExtendedAccessLogValvepublic ExtendedAccessLogValve()
 
- 
- 
Method Details- 
openprotected void open()Description copied from class:AccessLogValveOpen the new log file for the date specified bydateStamp.- Overrides:
- openin class- AccessLogValve
 
- 
createLogElementsDescription copied from class:AbstractAccessLogValveParse pattern string and create the array of AccessLogElement.- Overrides:
- createLogElementsin class- AbstractAccessLogValve
- Returns:
- the log elements array
 
- 
getLogElementprotected AbstractAccessLogValve.AccessLogElement getLogElement(String token, ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException - Throws:
- IOException
 
- 
getClientToServerElementprotected AbstractAccessLogValve.AccessLogElement getClientToServerElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException - Throws:
- IOException
 
- 
getServerToClientElementprotected AbstractAccessLogValve.AccessLogElement getServerToClientElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException - Throws:
- IOException
 
- 
getProxyElementprotected AbstractAccessLogValve.AccessLogElement getProxyElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException - Throws:
- IOException
 
- 
getXParameterElementprotected AbstractAccessLogValve.AccessLogElement getXParameterElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException - Throws:
- IOException
 
- 
getServletRequestElement
 
-