org.apache.catalina.valves

Class ExtendedAccessLogValve

public class ExtendedAccessLogValve extends AccessLogValve implements Lifecycle

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:

Log rotation can be on or off. This is dictated by the rotatable property.

For UvNIX users, another field called checkExistsis 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) $

Author: Tim Funk Peter Rossbach

Nested Class Summary
protected classExtendedAccessLogValve.CookieElement
protected static classExtendedAccessLogValve.DateElement
protected classExtendedAccessLogValve.PatternTokenizer
protected classExtendedAccessLogValve.RequestAttributeElement
protected classExtendedAccessLogValve.RequestHeaderElement
protected classExtendedAccessLogValve.RequestParameterElement
protected classExtendedAccessLogValve.ResponseAllHeaderElement
write a specific response header - x-O(xxx)
protected classExtendedAccessLogValve.ResponseHeaderElement
protected classExtendedAccessLogValve.ServletContextElement
protected classExtendedAccessLogValve.SessionAttributeElement
protected static classExtendedAccessLogValve.TimeElement
Field Summary
protected static StringextendedAccessLogInfo
The descriptive information about this implementation.
Method Summary
protected AccessLogElement[]createLogElements()
protected AccessLogElementgetClientToServerElement(ExtendedAccessLogValve.PatternTokenizer tokenizer)
StringgetInfo()
Return descriptive information about this implementation.
protected AccessLogElementgetLogElement(String token, ExtendedAccessLogValve.PatternTokenizer tokenizer)
protected AccessLogElementgetProxyElement(ExtendedAccessLogValve.PatternTokenizer tokenizer)
protected AccessLogElementgetServerToClientElement(ExtendedAccessLogValve.PatternTokenizer tokenizer)
protected AccessLogElementgetServletRequestElement(String parameter)
protected AccessLogElementgetXParameterElement(ExtendedAccessLogValve.PatternTokenizer tokenizer)
protected voidopen()
Open the new log file for the date specified by dateStamp.

Field Detail

extendedAccessLogInfo

protected static final String extendedAccessLogInfo
The descriptive information about this implementation.

Method Detail

createLogElements

protected AccessLogElement[] createLogElements()

getClientToServerElement

protected AccessLogElement getClientToServerElement(ExtendedAccessLogValve.PatternTokenizer tokenizer)

getInfo

public String getInfo()
Return descriptive information about this implementation.

getLogElement

protected AccessLogElement getLogElement(String token, ExtendedAccessLogValve.PatternTokenizer tokenizer)

getProxyElement

protected AccessLogElement getProxyElement(ExtendedAccessLogValve.PatternTokenizer tokenizer)

getServerToClientElement

protected AccessLogElement getServerToClientElement(ExtendedAccessLogValve.PatternTokenizer tokenizer)

getServletRequestElement

protected AccessLogElement getServletRequestElement(String parameter)

getXParameterElement

protected AccessLogElement getXParameterElement(ExtendedAccessLogValve.PatternTokenizer tokenizer)

open

protected void open()
Open the new log file for the date specified by dateStamp.
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.