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 {@link #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 {@link #setDefaultLogger} class property can be called whichsets the ancesteral Avalon logger for this class. Any
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.
@author
Neeme Praks
@version $Revision: 424107 $ $Date: 2006-07-21 01:15:42 +0200 (fr, 21 jul 2006) $