|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.util.log.LogHandler
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 static java.io.PrintWriter |
defaultSink
|
protected int |
level
|
protected java.io.PrintWriter |
sink
|
Constructor Summary | |
LogHandler()
|
Method Summary | |
void |
close()
Close the log. |
void |
flush()
Flush the log. |
int |
getLevel()
Get the current verbosity level. |
void |
log(java.lang.String prefix,
java.lang.String msg,
java.lang.Throwable t,
int verbosityLevel)
Prints log message and stack trace. |
static void |
setDefaultSink(java.io.Writer w)
Set the default output stream that is used by all logging channels. |
void |
setLevel(int level)
Set the verbosity level for this logger. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.PrintWriter sink
protected int level
protected static java.io.PrintWriter defaultSink
Constructor Detail |
public LogHandler()
Method Detail |
public void log(java.lang.String prefix, java.lang.String msg, java.lang.Throwable t, int verbosityLevel)
prefix
- optional prefix.t
- the exception that was thrown.verbosityLevel
- what type of message is this?
(WARNING/DEBUG/INFO etc)public void flush()
public void close()
public void setLevel(int level)
level
- one of the verbosity level codes.public int getLevel()
public static void setDefaultSink(java.io.Writer w)
w
- the default output stream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |