|
|||||||||||
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 toMethod 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 constructorpublic void debug(java.lang.Object o, java.lang.Throwable t)
Log
Log an error with debug log level.
debug
in interface Log
o
- log this messaget
- log this causeLog.debug(java.lang.Object, java.lang.Throwable)
public void debug(java.lang.Object o)
Log
Log a message with debug log level.
debug
in interface Log
o
- log this messageLog.debug(java.lang.Object)
public void error(java.lang.Object o, java.lang.Throwable t)
Log
Log an error with error log level.
error
in interface Log
o
- log this messaget
- log this causeLog.error(java.lang.Object, java.lang.Throwable)
public void error(java.lang.Object o)
Log
Log a message with error log level.
error
in interface Log
o
- log this messageLog.error(java.lang.Object)
public void fatal(java.lang.Object o, java.lang.Throwable t)
Log
Log an error with fatal log level.
fatal
in interface Log
o
- log this messaget
- log this causeLog.fatal(java.lang.Object, java.lang.Throwable)
public void fatal(java.lang.Object o)
Log
Log a message with fatal log level.
fatal
in interface Log
o
- log this messageLog.fatal(java.lang.Object)
public void info(java.lang.Object o, java.lang.Throwable t)
Log
Log an error with info log level.
info
in interface Log
o
- log this messaget
- log this causeLog.info(java.lang.Object, java.lang.Throwable)
public void info(java.lang.Object o)
Log
Log a message with info log level.
info
in interface Log
o
- log this messageLog.info(java.lang.Object)
public boolean isDebugEnabled()
Log
Is 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 Log
Log.isDebugEnabled()
public boolean isErrorEnabled()
Log
Is 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 Log
Log.isErrorEnabled()
public boolean isFatalEnabled()
Log
Is 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 Log
Log.isFatalEnabled()
public boolean isInfoEnabled()
Log
Is 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 Log
Log.isInfoEnabled()
public boolean isTraceEnabled()
Log
Is 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 Log
Log.isTraceEnabled()
public boolean isWarnEnabled()
Log
Is 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 Log
Log.isWarnEnabled()
public void trace(java.lang.Object o, java.lang.Throwable t)
Log
Log an error with trace log level.
trace
in interface Log
o
- log this messaget
- log this causeLog.trace(java.lang.Object, java.lang.Throwable)
public void trace(java.lang.Object o)
Log
Log a message with trace log level.
trace
in interface Log
o
- log this messageLog.trace(java.lang.Object)
public void warn(java.lang.Object o, java.lang.Throwable t)
Log
Log an error with warn log level.
warn
in interface Log
o
- log this messaget
- log this causeLog.warn(java.lang.Object, java.lang.Throwable)
public void warn(java.lang.Object o)
Log
Log a message with warn log level.
warn
in interface Log
o
- log this messageLog.warn(java.lang.Object)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |