Home » apache-tomcat-6.0.26-src » org.apache » tomcat » util » log » [javadoc | source]
org.apache.tomcat.util.log
public class: LogHandler [javadoc | source]
java.lang.Object
   org.apache.tomcat.util.log.LogHandler

Direct Known Subclasses:
    CommonLogHandler

Log destination ( or channel ). This is the base class that will be extended by log handlers - tomcat uses util.qlog.QueueLogger, in future we'll use log4j or java.util.logger adapters. The base class writes to a (default) writer, and it can be used for very simple logging.
Field Summary
protected  PrintWriter sink     
protected  int level     
protected static  PrintWriter defaultSink     
Method from org.apache.tomcat.util.log.LogHandler Summary:
close,   flush,   getLevel,   log,   setDefaultSink,   setLevel
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.log.LogHandler Detail:
 public synchronized  void close() 
    Close the log.
 public  void flush() 
    Flush the log.
 public int getLevel() 
    Get the current verbosity level.
 public  void log(String prefix,
    String msg,
    Throwable t,
    int verbosityLevel) 
    Prints log message and stack trace. This method should be overriden by real logger implementations
 public static  void setDefaultSink(Writer w) 
    Set the default output stream that is used by all logging channels.
 public  void setLevel(int level) 
    Set the verbosity level for this logger. This controls how the logs will be filtered.