org.apache.commons.logging.impl
public class AvalonLogger extends Object implements Log
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
instances created through the LogFactory
mechanisms will output
to child loggers of this Logger
.
Note: AvalonLogger
does not implement Serializable
because the constructors available for it make this impossible to achieve in all
circumstances; there is no way to "reconnect" to an underlying Logger object on
deserialization if one was just passed in to the constructor of the original
object. This class was marked Serializable in the 1.0.4 release of
commons-logging, but this never actually worked (a NullPointerException would
be thrown as soon as the deserialized object was used), so removing this marker
is not considered to be an incompatible change.
Constructor Summary | |
---|---|
AvalonLogger(Logger logger)
Constructs an AvalonLogger that outputs to the given
Logger instance. | |
AvalonLogger(String name) |
Method Summary | |
---|---|
void | debug(Object message, Throwable t)
Logs a message with
org.apache.avalon.framework.logger.Logger.debug .
|
void | debug(Object message)
Logs a message with
org.apache.avalon.framework.logger.Logger.debug .
|
void | error(Object message, Throwable t)
Logs a message with
org.apache.avalon.framework.logger.Logger.error .
|
void | error(Object message)
Logs a message with
org.apache.avalon.framework.logger.Logger.error .
|
void | fatal(Object message, Throwable t)
Logs a message with
org.apache.avalon.framework.logger.Logger.fatalError .
|
void | fatal(Object message)
Logs a message with
org.apache.avalon.framework.logger.Logger.fatalError .
|
Logger | getLogger()
Gets the Avalon logger implementation used to perform logging. |
void | info(Object message, Throwable t)
Logs a message with
org.apache.avalon.framework.logger.Logger.info .
|
void | info(Object message)
Logs a message with
org.apache.avalon.framework.logger.Logger.info .
|
boolean | isDebugEnabled()
Is logging to
org.apache.avalon.framework.logger.Logger.debug enabled? |
boolean | isErrorEnabled()
Is logging to
org.apache.avalon.framework.logger.Logger.error enabled? |
boolean | isFatalEnabled()
Is logging to
org.apache.avalon.framework.logger.Logger.fatalError enabled? |
boolean | isInfoEnabled()
Is logging to
org.apache.avalon.framework.logger.Logger.info enabled? |
boolean | isTraceEnabled()
Is logging to
org.apache.avalon.framework.logger.Logger.debug enabled? |
boolean | isWarnEnabled()
Is logging to
org.apache.avalon.framework.logger.Logger.warn enabled? |
static void | setDefaultLogger(Logger logger)
Sets the ancesteral Avalon logger from which the delegating loggers
will descend. |
void | trace(Object message, Throwable t)
Logs a message with
org.apache.avalon.framework.logger.Logger.debug .
|
void | trace(Object message)
Logs a message with
org.apache.avalon.framework.logger.Logger.debug .
|
void | warn(Object message, Throwable t)
Logs a message with
org.apache.avalon.framework.logger.Logger.warn .
|
void | warn(Object message)
Logs a message with
org.apache.avalon.framework.logger.Logger.warn .
|
AvalonLogger
that outputs to the given
Logger
instance.Parameters: logger the avalon logger implementation to delegate to
AvalonLogger
that will log to a child
of the Logger
set by calling AvalonLogger.Parameters: name the name of the avalon logger implementation to delegate to
org.apache.avalon.framework.logger.Logger.debug
.
Parameters: message to log t log this cause
See Also: Log
org.apache.avalon.framework.logger.Logger.debug
.
Parameters: message to log.
See Also: debug
org.apache.avalon.framework.logger.Logger.error
.
Parameters: message to log t log this cause
See Also: Log
org.apache.avalon.framework.logger.Logger.error
.
Parameters: message to log
See Also: error
org.apache.avalon.framework.logger.Logger.fatalError
.
Parameters: message to log. t log this cause.
See Also: Log
org.apache.avalon.framework.logger.Logger.fatalError
.
Parameters: message to log
See Also: fatal
Returns: avalon logger implementation
org.apache.avalon.framework.logger.Logger.info
.
Parameters: message to log t log this cause
See Also: Log
org.apache.avalon.framework.logger.Logger.info
.
Parameters: message to log
See Also: info
org.apache.avalon.framework.logger.Logger.debug
enabled?See Also: isDebugEnabled
org.apache.avalon.framework.logger.Logger.error
enabled?See Also: isErrorEnabled
org.apache.avalon.framework.logger.Logger.fatalError
enabled?See Also: isFatalEnabled
org.apache.avalon.framework.logger.Logger.info
enabled?See Also: isInfoEnabled
org.apache.avalon.framework.logger.Logger.debug
enabled?See Also: isTraceEnabled
org.apache.avalon.framework.logger.Logger.warn
enabled?See Also: isWarnEnabled
Parameters: logger the default avalon logger, in case there is no logger instance supplied in constructor
org.apache.avalon.framework.logger.Logger.debug
.
Parameters: message to log. t log this cause.
See Also: Log
org.apache.avalon.framework.logger.Logger.debug
.
Parameters: message to log
See Also: trace
org.apache.avalon.framework.logger.Logger.warn
.
Parameters: message to log t log this cause
See Also: Log
org.apache.avalon.framework.logger.Logger.warn
.
Parameters: message to log
See Also: warn