org.objectweb.util.monolog.lib
Class LoggableImpl
java.lang.Object
org.objectweb.util.monolog.lib.LoggableImpl
- All Implemented Interfaces:
- Loggable
public class LoggableImpl
- extends Object
- implements Loggable
This class is a basic implementation of Loggable interface. This class holds
reference to the logger and the logger factory.
- Author:
- S.Chassande-Barrioz
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debug
protected boolean debug
logger
protected Logger logger
loggerFactory
protected LoggerFactory loggerFactory
LoggableImpl
public LoggableImpl()
getLogger
public Logger getLogger()
- Specified by:
getLogger in interface Loggable
getLoggerFactory
public LoggerFactory getLoggerFactory()
- Specified by:
getLoggerFactory in interface Loggable
setLogger
public void setLogger(Logger l)
- Specified by:
setLogger in interface Loggable
setLoggerFactory
public void setLoggerFactory(LoggerFactory lf)
- Specified by:
setLoggerFactory in interface Loggable
getLoggerName
public String getLoggerName()
getExpectedLoggerName
public String getExpectedLoggerName()
- Returns:
- a string defining the expected name of the logger. By default
this method retrieves a null value meaning that no particular name is
expected for the logger. Typically this method has to be override in
order to specify an expected logger name if wanted.
getLoggerNameSuffix
public String getLoggerNameSuffix()
- Returns:
- a string defining a suffix of the expected name of the logger.
logger.name = logger.name + "." + suffix
isDebug
public boolean isDebug()
- Indicates if the DEBUG level is enabled for the current logger.
assignLogger
public void assignLogger(Object o)
- Assign the current logger and the current loggerFactory to an object
or to each element if o is a structure. This method supports three
structures: Map, Collection and Array.
assignLogger
public void assignLogger(Object o,
Logger l)
- Assign a logger and the current loggerFactory to an object or to each
element if o is a structure. This method supports three structures: Map,
Collection and Array.
Copyright © 2012 OW2 Consortium. All Rights Reserved.