Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » valves » [javadoc | source]
org.apache.catalina.valves
public class: ExtendedAccessLogValve [javadoc | source]
java.lang.Object
   org.apache.catalina.valves.ValveBase
      org.apache.catalina.valves.AccessLogValve
         org.apache.catalina.valves.ExtendedAccessLogValve

All Implemented Interfaces:
    Lifecycle, Valve, MBeanRegistration, Contained

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.

Nested Class Summary:
protected class  ExtendedAccessLogValve.DateElement   
protected class  ExtendedAccessLogValve.TimeElement   
protected class  ExtendedAccessLogValve.RequestHeaderElement   
protected class  ExtendedAccessLogValve.ResponseHeaderElement   
protected class  ExtendedAccessLogValve.ServletContextElement   
protected class  ExtendedAccessLogValve.CookieElement   
protected class  ExtendedAccessLogValve.ResponseAllHeaderElement  write a specific response header - x-O(xxx) 
protected class  ExtendedAccessLogValve.RequestAttributeElement   
protected class  ExtendedAccessLogValve.SessionAttributeElement   
protected class  ExtendedAccessLogValve.RequestParameterElement   
protected class  ExtendedAccessLogValve.PatternTokenizer   
Field Summary
protected static final  String extendedAccessLogInfo    The descriptive information about this implementation. 
Fields inherited from org.apache.catalina.valves.AccessLogValve:
info,  lifecycle,  months,  enabled,  pattern,  prefix,  rotatable,  sm,  started,  suffix,  writer,  fileDateFormatter,  currentLogFile,  condition,  fileDateFormat,  logElements
Fields inherited from org.apache.catalina.valves.ValveBase:
container,  containerLog,  info,  next,  sm,  domain,  oname,  mserver,  controller
Method from org.apache.catalina.valves.ExtendedAccessLogValve Summary:
createLogElements,   getClientToServerElement,   getInfo,   getLogElement,   getProxyElement,   getServerToClientElement,   getServletRequestElement,   getXParameterElement,   open
Methods from org.apache.catalina.valves.AccessLogValve:
addLifecycleListener,   backgroundProcess,   createLogElements,   findLifecycleListeners,   getCondition,   getDirectory,   getEnabled,   getFileDateFormat,   getInfo,   getPattern,   getPrefix,   getSuffix,   invoke,   isBuffered,   isCheckExists,   isResolveHosts,   isRotatable,   log,   open,   removeLifecycleListener,   rotate,   setBuffered,   setCheckExists,   setCondition,   setDirectory,   setEnabled,   setFileDateFormat,   setPattern,   setPrefix,   setResolveHosts,   setRotatable,   setSuffix,   start,   stop
Methods from org.apache.catalina.valves.ValveBase:
backgroundProcess,   createObjectName,   event,   getContainer,   getContainerName,   getController,   getDomain,   getInfo,   getNext,   getObjectName,   getParentName,   invoke,   postDeregister,   postRegister,   preDeregister,   preRegister,   setContainer,   setController,   setNext,   setObjectName,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.valves.ExtendedAccessLogValve Detail:
 protected AccessLogElement[] createLogElements() 
 protected AccessLogElement getClientToServerElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException 
 public String getInfo() 
    Return descriptive information about this implementation.
 protected AccessLogElement getLogElement(String token,
    ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException 
 protected AccessLogElement getProxyElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException 
 protected AccessLogElement getServerToClientElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException 
 protected AccessLogElement getServletRequestElement(String parameter) 
 protected AccessLogElement getXParameterElement(ExtendedAccessLogValve.PatternTokenizer tokenizer) throws IOException 
 protected synchronized  void open() 
    Open the new log file for the date specified by dateStamp.