|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mortbay.log.LogImpl
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
LogFactory
Field Summary | |
LogSink[] |
_sinks
|
static java.lang.String |
DEBUG
|
static java.lang.String |
ERROR
|
static java.lang.String |
FAIL
|
static java.lang.String |
INFO
|
static java.lang.String |
TRACE
|
static java.lang.String |
WARN
|
Constructor Summary | |
LogImpl()
Construct the shared instance of Log that decodes the options setup in the environments properties. |
Method Summary | |
void |
add(LogSink logSink)
Add a Log Sink. |
void |
add(java.lang.String logSinkClass)
Add a Log Sink. |
void |
debug(java.lang.Object m)
|
void |
debug(java.lang.Object m,
java.lang.Throwable ex)
|
void |
deleteStoppedLogSinks()
|
void |
error(java.lang.Object arg0)
|
void |
error(java.lang.Object arg0,
java.lang.Throwable arg1)
|
void |
fatal(java.lang.Object arg0)
|
void |
fatal(java.lang.Object arg0,
java.lang.Throwable arg1)
|
boolean |
getDebug()
Get the debug status. |
java.lang.String |
getDebugPatterns()
Get the debug patterns. |
LogSink[] |
getLogSinks()
|
boolean |
getSuppressWarnings()
Get the warnings suppression status. |
int |
getVerbose()
Get the verbosity level. |
void |
info(java.lang.Object arg0)
|
void |
info(java.lang.Object arg0,
java.lang.Throwable arg1)
|
boolean |
isDebugEnabled()
|
boolean |
isErrorEnabled()
|
boolean |
isFatalEnabled()
|
boolean |
isInfoEnabled()
|
boolean |
isTraceEnabled()
|
boolean |
isWarnEnabled()
|
void |
message(java.lang.String tag,
java.lang.Object msg)
Log a message. |
void |
message(java.lang.String tag,
java.lang.Object msg,
Frame frame)
|
void |
message(java.lang.String tag,
java.lang.Object msg,
Frame frame,
long time)
Log a message. |
void |
message(java.lang.String tag,
java.lang.Object msg,
int depth)
Log a message. |
void |
reset()
No logging. |
void |
setDebug(boolean debug)
Set if debugging is on or off. |
void |
setDebugPatterns(java.lang.String patterns)
Set debug patterns. |
void |
setSuppressWarnings(boolean warnings)
Set warning suppression. |
void |
setVerbose(int verbose)
Set verbosity level. |
void |
trace(java.lang.Object arg0)
|
void |
trace(java.lang.Object arg0,
java.lang.Throwable arg1)
|
void |
warn(java.lang.Object arg0)
|
void |
warn(java.lang.Object arg0,
java.lang.Throwable arg1)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEBUG
public static final java.lang.String INFO
public static final java.lang.String TRACE
public static final java.lang.String FAIL
public static final java.lang.String WARN
public static final java.lang.String ERROR
public LogSink[] _sinks
Constructor Detail |
public LogImpl()
Method Detail |
public void add(LogSink logSink) throws java.lang.Exception
logSink
-
java.lang.Exception
public void add(java.lang.String logSinkClass)
logSinkClass
- The logsink classname or null for the default.public void debug(java.lang.Object m)
debug
in interface org.apache.commons.logging.Log
public void debug(java.lang.Object m, java.lang.Throwable ex)
debug
in interface org.apache.commons.logging.Log
public void deleteStoppedLogSinks()
public void reset()
public void error(java.lang.Object arg0)
error
in interface org.apache.commons.logging.Log
public void error(java.lang.Object arg0, java.lang.Throwable arg1)
error
in interface org.apache.commons.logging.Log
public void fatal(java.lang.Object arg0)
fatal
in interface org.apache.commons.logging.Log
public void fatal(java.lang.Object arg0, java.lang.Throwable arg1)
fatal
in interface org.apache.commons.logging.Log
public boolean getDebug()
public java.lang.String getDebugPatterns()
public LogSink[] getLogSinks()
public boolean getSuppressWarnings()
public int getVerbose()
public void info(java.lang.Object arg0)
info
in interface org.apache.commons.logging.Log
public void info(java.lang.Object arg0, java.lang.Throwable arg1)
info
in interface org.apache.commons.logging.Log
public boolean isDebugEnabled()
isDebugEnabled
in interface org.apache.commons.logging.Log
public boolean isErrorEnabled()
isErrorEnabled
in interface org.apache.commons.logging.Log
public boolean isFatalEnabled()
isFatalEnabled
in interface org.apache.commons.logging.Log
public boolean isInfoEnabled()
isInfoEnabled
in interface org.apache.commons.logging.Log
public boolean isTraceEnabled()
isTraceEnabled
in interface org.apache.commons.logging.Log
public boolean isWarnEnabled()
isWarnEnabled
in interface org.apache.commons.logging.Log
public void message(java.lang.String tag, java.lang.Object msg, Frame frame)
public void message(java.lang.String tag, java.lang.Object msg, Frame frame, long time)
tag
- Tag for type of logmsg
- The messageframe
- The frame that generated the message.time
- The time stamp of the message.public void message(java.lang.String tag, java.lang.Object msg)
tag
- Tag for type of logmsg
- The messagepublic void message(java.lang.String tag, java.lang.Object msg, int depth)
tag
- Tag for type of logmsg
- The messagepublic void setDebug(boolean debug)
debug
- public void setDebugPatterns(java.lang.String patterns)
patterns
- comma separated string of patternspublic void setSuppressWarnings(boolean warnings)
warnings
- Warnings suppress if this is true and debug is falsepublic void setVerbose(int verbose)
verbose
- public void trace(java.lang.Object arg0)
trace
in interface org.apache.commons.logging.Log
public void trace(java.lang.Object arg0, java.lang.Throwable arg1)
trace
in interface org.apache.commons.logging.Log
public void warn(java.lang.Object arg0)
warn
in interface org.apache.commons.logging.Log
public void warn(java.lang.Object arg0, java.lang.Throwable arg1)
warn
in interface org.apache.commons.logging.Log
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |