Class AccessLogValve

java.lang.Object
All Implemented Interfaces:
MBeanRegistration, AccessLog, Contained, JmxEnabled, Lifecycle, Valve
Direct Known Subclasses:
ExtendedAccessLogValve, JsonAccessLogValve

public class AccessLogValve extends AbstractAccessLogValve
This is a concrete implementation of AbstractAccessLogValve that outputs the access log to a file. The features of this implementation include:
  • Automatic date-based rollover of log files
  • Optional log file rotation

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.