|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.apache.commons.logging.impl.AvalonLogger
Implementation of commons-logging Log interface that delegates all logging calls to the Avalon logging abstraction: the Logger interface.
There are two ways in which this class can be used:
AvalonLogger(Logger)). In this case, it acts
as a simple thin wrapping implementation over the logger. This is
particularly useful when using a property setter.
setDefaultLogger(org.apache.avalon.framework.logger.Logger) class property can be called which
sets the ancesteral Avalon logger for this class. Any AvalonLogger
instances created through the LogFactory mechanisms will output
to child loggers of this Logger.
| Constructor Summary | |
AvalonLogger(org.apache.avalon.framework.logger.Logger logger)
Constructs an AvalonLogger that outputs to the given
Logger instance. |
|
AvalonLogger(java.lang.String name)
Constructs an AvalonLogger that will log to a child
of the Logger set by calling setDefaultLogger(org.apache.avalon.framework.logger.Logger). |
|
| Method Summary | |
void |
debug(java.lang.Object o)
Log a message with debug log level. |
void |
debug(java.lang.Object o,
java.lang.Throwable t)
Log an error with debug log level. |
void |
error(java.lang.Object o)
Log a message with error log level. |
void |
error(java.lang.Object o,
java.lang.Throwable t)
Log an error with error log level. |
void |
fatal(java.lang.Object o)
Log a message with fatal log level. |
void |
fatal(java.lang.Object o,
java.lang.Throwable t)
Log an error with fatal log level. |
org.apache.avalon.framework.logger.Logger |
getLogger()
Gets the Avalon logger implementation used to perform logging. |
void |
info(java.lang.Object o)
Log a message with info log level. |
void |
info(java.lang.Object o,
java.lang.Throwable t)
Log an error with info log level. |
boolean |
isDebugEnabled()
Is debug logging currently enabled? |
boolean |
isErrorEnabled()
Is error logging currently enabled? |
boolean |
isFatalEnabled()
Is fatal logging currently enabled? |
boolean |
isInfoEnabled()
Is info logging currently enabled? |
boolean |
isTraceEnabled()
Is trace logging currently enabled? |
boolean |
isWarnEnabled()
Is warn logging currently enabled? |
static void |
setDefaultLogger(org.apache.avalon.framework.logger.Logger logger)
Sets the ancesteral Avalon logger from which the delegating loggers will descend. |
void |
trace(java.lang.Object o)
Log a message with trace log level. |
void |
trace(java.lang.Object o,
java.lang.Throwable t)
Log an error with trace log level. |
void |
warn(java.lang.Object o)
Log a message with warn log level. |
void |
warn(java.lang.Object o,
java.lang.Throwable t)
Log an error with warn log level. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AvalonLogger(org.apache.avalon.framework.logger.Logger logger)
AvalonLogger that outputs to the given
Logger instance.
logger - the avalon logger implementation to delegate topublic AvalonLogger(java.lang.String name)
AvalonLogger that will log to a child
of the Logger set by calling setDefaultLogger(org.apache.avalon.framework.logger.Logger).
name - the name of the avalon logger implementation to delegate to| Method Detail |
public org.apache.avalon.framework.logger.Logger getLogger()
public static void setDefaultLogger(org.apache.avalon.framework.logger.Logger logger)
logger - the default avalon logger,
in case there is no logger instance supplied in constructor
public void debug(java.lang.Object o,
java.lang.Throwable t)
LogLog an error with debug log level.
debug in interface Logo - log this messaget - log this causeLog.debug(java.lang.Object, java.lang.Throwable)public void debug(java.lang.Object o)
LogLog a message with debug log level.
debug in interface Logo - log this messageLog.debug(java.lang.Object)
public void error(java.lang.Object o,
java.lang.Throwable t)
LogLog an error with error log level.
error in interface Logo - log this messaget - log this causeLog.error(java.lang.Object, java.lang.Throwable)public void error(java.lang.Object o)
LogLog a message with error log level.
error in interface Logo - log this messageLog.error(java.lang.Object)
public void fatal(java.lang.Object o,
java.lang.Throwable t)
LogLog an error with fatal log level.
fatal in interface Logo - log this messaget - log this causeLog.fatal(java.lang.Object, java.lang.Throwable)public void fatal(java.lang.Object o)
LogLog a message with fatal log level.
fatal in interface Logo - log this messageLog.fatal(java.lang.Object)
public void info(java.lang.Object o,
java.lang.Throwable t)
LogLog an error with info log level.
info in interface Logo - log this messaget - log this causeLog.info(java.lang.Object, java.lang.Throwable)public void info(java.lang.Object o)
LogLog a message with info log level.
info in interface Logo - log this messageLog.info(java.lang.Object)public boolean isDebugEnabled()
LogIs debug logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than debug.
isDebugEnabled in interface LogLog.isDebugEnabled()public boolean isErrorEnabled()
LogIs error logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than error.
isErrorEnabled in interface LogLog.isErrorEnabled()public boolean isFatalEnabled()
LogIs fatal logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than fatal.
isFatalEnabled in interface LogLog.isFatalEnabled()public boolean isInfoEnabled()
LogIs info logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than info.
isInfoEnabled in interface LogLog.isInfoEnabled()public boolean isTraceEnabled()
LogIs trace logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than trace.
isTraceEnabled in interface LogLog.isTraceEnabled()public boolean isWarnEnabled()
LogIs warn logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than warn.
isWarnEnabled in interface LogLog.isWarnEnabled()
public void trace(java.lang.Object o,
java.lang.Throwable t)
LogLog an error with trace log level.
trace in interface Logo - log this messaget - log this causeLog.trace(java.lang.Object, java.lang.Throwable)public void trace(java.lang.Object o)
LogLog a message with trace log level.
trace in interface Logo - log this messageLog.trace(java.lang.Object)
public void warn(java.lang.Object o,
java.lang.Throwable t)
LogLog an error with warn log level.
warn in interface Logo - log this messaget - log this causeLog.warn(java.lang.Object, java.lang.Throwable)public void warn(java.lang.Object o)
LogLog a message with warn log level.
warn in interface Logo - log this messageLog.warn(java.lang.Object)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||