|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.util.monolog.wrapper.common.AbstractFactory
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory
This class wraps the LoggerFactory, HandlerFactory, LevelFactory concepts into the log4j world. This implementation supports also the Configurable interface. Then it is possible to specify a log4j configuration file.
Field Summary | |
static java.lang.String |
LOG4J_CF_PROP
|
static java.lang.String |
LOG4J_CF_VALUE
|
protected Logger |
rootLogger
The root logger of the logger hierarchy |
Fields inherited from class org.objectweb.util.monolog.wrapper.common.AbstractFactory |
debug, handlers, intToNames, nameToLevel, resourceBundleName |
Fields inherited from interface org.objectweb.util.monolog.api.MonologFactory |
DEFAULT, LOG_CONFIGURATION_FILE, LOG_CONFIGURATION_FILE_USE_CLASSPATH, LOG_CONFIGURATION_TYPE, PROPERTY, XML |
Constructor Summary | |
MonologLoggerFactory()
It intializes the data struture, defines the default level and the root logger. |
Method Summary | |
void |
configure(java.util.Properties prop)
This method permits to configure the factory with tha specific configuration file: like a log4j.properties |
Handler |
createHandler(java.lang.String hn,
byte handlertype)
It retrieves a new instance of an handler which the type is specified by the parameter. |
Logger |
getLogger(java.lang.String key)
This method permits to fetch a Logger. |
Logger |
getLogger(java.lang.String key,
java.lang.String rbn)
This method permits to fetch a Logger. |
Logger[] |
getLoggers()
It retrieves a list of all loggers. |
Methods inherited from class org.objectweb.util.monolog.wrapper.common.AbstractFactory |
debug, defineLevel, defineLevel, getHandler, getHandlers, getLevel, getLevel, getLevels, getResourceBundleName, removeHandler, removeLevel, setResourceBundleName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String LOG4J_CF_PROP
public static final java.lang.String LOG4J_CF_VALUE
protected Logger rootLogger
Constructor Detail |
public MonologLoggerFactory()
Method Detail |
public void configure(java.util.Properties prop) throws java.lang.Exception
configure
in interface MonologFactory
configure
in class AbstractFactory
java.lang.Exception
public Logger getLogger(java.lang.String key)
LoggerFactory
getLogger
in interface LoggerFactory
getLogger
in class AbstractFactory
public Logger getLogger(java.lang.String key, java.lang.String rbn)
LoggerFactory
public Logger[] getLoggers()
LoggerFactory
getLoggers
in interface LoggerFactory
getLoggers
in class AbstractFactory
public Handler createHandler(java.lang.String hn, byte handlertype)
HandlerFactory
createHandler
in interface HandlerFactory
createHandler
in class AbstractFactory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |