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:
- the instance can be constructed with an Avalon logger
(by calling
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.
- the
setDefaultLogger(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
.
debug
public void debug(Object o)
- debug in interface Log
org.apache.commons.logging.Log.debug(java.lang.Object)
debug
public void debug(Object o,
Throwable t)
- debug in interface Log
org.apache.commons.logging.Log.debug(java.lang.Object, java.lang.Throwable)
error
public void error(Object o)
- error in interface Log
org.apache.commons.logging.Log.error(java.lang.Object)
error
public void error(Object o,
Throwable t)
- error in interface Log
org.apache.commons.logging.Log.error(java.lang.Object, java.lang.Throwable)
fatal
public void fatal(Object o)
- fatal in interface Log
org.apache.commons.logging.Log.fatal(java.lang.Object)
fatal
public void fatal(Object o,
Throwable t)
- fatal in interface Log
org.apache.commons.logging.Log.fatal(java.lang.Object, java.lang.Throwable)
getLogger
public Logger getLogger()
Gets the Avalon logger implementation used to perform logging.
- avalon logger implementation
info
public void info(Object o)
- info in interface Log
org.apache.commons.logging.Log.info(java.lang.Object)
info
public void info(Object o,
Throwable t)
- info in interface Log
org.apache.commons.logging.Log.info(java.lang.Object, java.lang.Throwable)
setDefaultLogger
public static void setDefaultLogger(Logger logger)
Sets the ancesteral Avalon logger from which the delegating loggers
will descend.
logger
- the default avalon logger,
in case there is no logger instance supplied in constructor
trace
public void trace(Object o)
- trace in interface Log
org.apache.commons.logging.Log.trace(java.lang.Object)
trace
public void trace(Object o,
Throwable t)
- trace in interface Log
org.apache.commons.logging.Log.trace(java.lang.Object, java.lang.Throwable)
warn
public void warn(Object o)
- warn in interface Log
org.apache.commons.logging.Log.warn(java.lang.Object)
warn
public void warn(Object o,
Throwable t)
- warn in interface Log
org.apache.commons.logging.Log.warn(java.lang.Object, java.lang.Throwable)