A Commons Log implementation for Jetty logs.
The log can contain multiple log syncs.
The following system properties can be used to control the configuration:
DEBUG - if set debugging is output is enabled.
DEBUG_PATTERNS - A list of substring patterns used to match against log information for
fine grained control of debug logging.
DEBUG_VERBOSE - If set to a positive integer, trace and info are enabled.
If set to zero, then info is enabled.
LOG_SINKS - List of class names used to instantiate the log sinks.
This logger can be configured with the org.mortbay.log.Factory
DEBUG
public static final String DEBUG
ERROR
public static final String ERROR
FAIL
public static final String FAIL
INFO
public static final String INFO
TRACE
public static final String TRACE
WARN
public static final String WARN
add
public void add(String logSinkClass)
Add a Log Sink.
logSinkClass
- The logsink classname or null for the default.
add
public void add(LogSink logSink)
throws Exception
Add a Log Sink.
debug
public void debug(Object m)
debug
public void debug(Object m,
Throwable ex)
deleteStoppedLogSinks
public void deleteStoppedLogSinks()
error
public void error(Object arg0)
error
public void error(Object arg0,
Throwable arg1)
fatal
public void fatal(Object arg0)
fatal
public void fatal(Object arg0,
Throwable arg1)
getDebug
public boolean getDebug()
Get the debug status.
getDebugPatterns
public String getDebugPatterns()
Get the debug patterns.
- Coma separated list of debug patterns
getLogSinks
public LogSink[] getLogSinks()
getSuppressWarnings
public boolean getSuppressWarnings()
Get the warnings suppression status.
- the warnings suppression status
getVerbose
public int getVerbose()
Get the verbosity level.
info
public void info(Object arg0)
info
public void info(Object arg0,
Throwable arg1)
isDebugEnabled
public boolean isDebugEnabled()
isErrorEnabled
public boolean isErrorEnabled()
isFatalEnabled
public boolean isFatalEnabled()
isInfoEnabled
public boolean isInfoEnabled()
isTraceEnabled
public boolean isTraceEnabled()
isWarnEnabled
public boolean isWarnEnabled()
message
public void message(String tag,
Object msg)
Log a message.
tag
- Tag for type of logmsg
- The message
message
public void message(String tag,
Object msg,
int depth)
Log a message.
tag
- Tag for type of logmsg
- The message
message
public void message(String tag,
Object msg,
Frame frame)
message
public void message(String tag,
Object msg,
Frame frame,
long time)
Log a message.
tag
- Tag for type of logmsg
- The messageframe
- The frame that generated the message.time
- The time stamp of the message.
reset
public void reset()
No logging.
All log sinks are stopped and removed.
setDebug
public void setDebug(boolean debug)
Set if debugging is on or off.
setDebugPatterns
public void setDebugPatterns(String patterns)
Set debug patterns.
patterns
- comma separated string of patterns
setSuppressWarnings
public void setSuppressWarnings(boolean warnings)
Set warning suppression.
warnings
- Warnings suppress if this is true and debug is false
setVerbose
public void setVerbose(int verbose)
Set verbosity level.
trace
public void trace(Object arg0)
trace
public void trace(Object arg0,
Throwable arg1)
warn
public void warn(Object arg0)
warn
public void warn(Object arg0,
Throwable arg1)