Save This Page
Home » apache-tomcat-6.0.26-src » org.apache » catalina » logger » [javadoc | source]
org.apache.catalina.logger
public class: FileLogger [javadoc | source]
java.lang.Object
   org.apache.catalina.logger.LoggerBase
      org.apache.catalina.logger.FileLogger

All Implemented Interfaces:
    Logger, MBeanRegistration, Lifecycle

Implementation of Logger that appends log messages to a file named {prefix}.{date}.{suffix} in a configured directory, with an optional preceding timestamp.
Field Summary
protected static final  String info    The descriptive information about this implementation. 
Fields inherited from org.apache.catalina.logger.LoggerBase:
container,  debug,  info,  lifecycle,  support,  verbosity,  domain,  host,  path,  oname,  controller,  mserver
Method from org.apache.catalina.logger.FileLogger Summary:
getDirectory,   getPrefix,   getSuffix,   getTimestamp,   log,   setDirectory,   setPrefix,   setSuffix,   setTimestamp,   start,   stop
Methods from org.apache.catalina.logger.LoggerBase:
addLifecycleListener,   addPropertyChangeListener,   createObjectName,   destroy,   findLifecycleListeners,   getContainer,   getController,   getDebug,   getDomain,   getInfo,   getObjectName,   getVerbosity,   init,   log,   log,   log,   log,   log,   postDeregister,   postRegister,   preDeregister,   preRegister,   removeLifecycleListener,   removePropertyChangeListener,   setContainer,   setController,   setDebug,   setVerbosity,   setVerbosityLevel,   start,   stop
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.logger.FileLogger Detail:
 public String getDirectory() 
    Return the directory in which we create log files.
 public String getPrefix() 
    Return the log file prefix.
 public String getSuffix() 
    Return the log file suffix.
 public boolean getTimestamp() 
    Return the timestamp flag.
 public  void log(String msg) 
    Writes the specified message to a servlet log file, usually an event log. The name and type of the servlet log is specific to the servlet container.
 public  void setDirectory(String directory) 
    Set the directory in which we create log files.
 public  void setPrefix(String prefix) 
    Set the log file prefix.
 public  void setSuffix(String suffix) 
    Set the log file suffix.
 public  void setTimestamp(boolean timestamp) 
    Set the timestamp flag.
 public  void start() throws LifecycleException 
    Prepare for the beginning of active use of the public methods of this component. This method should be called after configure(), and before any of the public methods of the component are utilized.
 public  void stop() throws LifecycleException 
    Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component.