|
||||||||||
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
public class 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 static Logger |
rootLogger
The root logger of the logger hierarchy |
Fields inherited from class org.objectweb.util.monolog.wrapper.common.AbstractFactory |
---|
CLASSLOADER_ISOLATION, classLoaderIsoltion, debug, handlers, handlerType2className, handlerTypes, intToNames, monologFactoryListeners, nameToLevel, resourceBundleName, rootLoggerName, rootLoggerPrefix |
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 |
protected java.lang.String[][] |
getDefaultHandlerType2className()
|
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. |
java.lang.String |
getWrapperName()
|
Methods inherited from class org.objectweb.util.monolog.wrapper.common.AbstractFactory |
---|
addMonologFactoryListener, createHandler, debug, defineLevel, defineLevel, getHandler, getHandlers, getLevel, getLevel, getLevels, getResourceBundleName, getRootLoggerPrefix, getTopicPrefix, getTopicWithoutPrefix, initHandlerType2className, monoLoggerName, removeHandler, removeLevel, removeMonologFactoryListener, setResourceBundleName, warn |
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 static Logger rootLogger
Constructor Detail |
---|
public MonologLoggerFactory()
Method Detail |
---|
public java.lang.String getWrapperName()
getWrapperName
in class AbstractFactory
protected java.lang.String[][] getDefaultHandlerType2className()
getDefaultHandlerType2className
in class AbstractFactory
public void configure(java.util.Properties prop) throws java.lang.Exception
configure
in interface MonologFactory
configure
in class AbstractFactory
prop
- contains properties which describes the way to configure.
In particular three properties could be used:
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |