public class LoggerFactory extends AbstractFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS
This constant means that this java log system must be initialize with
a xml file
|
static java.lang.String |
DEFAULT
This constant means that this java log system must be initialize with
the default configuration
|
static java.lang.String |
JAVALOG_CONFIGURATION
This constant is used to initialize the factory with the configure method
|
static java.lang.String |
JAVALOG_CONFIGURATION_CLASS
This constant is the properties class name with wich the java log system
must be initialized.
|
static java.lang.String |
JAVALOG_CONFIGURATION_FILE
This constant is the properties file name with wich the java log system
must be initialized.
|
protected static java.util.logging.LogManager |
manager
the LogManager of java.util.logging
|
static java.lang.String |
PROPERTY
This constant means that this java log system must be initialize with
a property file
|
protected static Logger |
rootLogger
the root logger
|
debug, handlers, handlerType2className, handlerTypes, intToNames, monologFactoryListeners, nameToLevel, resourceBundleName
LOG_CONFIGURATION_FILE, LOG_CONFIGURATION_FILE_USE_CLASSPATH, LOG_CONFIGURATION_TYPE, XML
Constructor and Description |
---|
LoggerFactory() |
Modifier and Type | Method and Description |
---|---|
void |
configure(java.util.Properties prop)
This method permits to configure the factory.
|
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.
|
protected Logger |
getMonoLogger(java.lang.String name,
java.lang.String resName)
This method allocates org.objectweb.util.monolog.wrapper.javaLog.Logger
objects whic are also java.util.logging.Logger and
org.objectweb.util.monolog.api.Logger.
|
java.lang.String |
getWrapperName() |
addMonologFactoryListener, createHandler, debug, defineLevel, defineLevel, getHandler, getHandlers, getLevel, getLevel, getLevels, getResourceBundleName, initHandlerType2className, removeHandler, removeLevel, removeMonologFactoryListener, setResourceBundleName, warn
protected static java.util.logging.LogManager manager
protected static Logger rootLogger
public static final java.lang.String JAVALOG_CONFIGURATION
public static final java.lang.String DEFAULT
public static final java.lang.String PROPERTY
public static final java.lang.String CLASS
public static final java.lang.String JAVALOG_CONFIGURATION_FILE
public static final java.lang.String JAVALOG_CONFIGURATION_CLASS
public java.lang.String getWrapperName()
getWrapperName
in class AbstractFactory
protected java.lang.String[][] getDefaultHandlerType2className()
getDefaultHandlerType2className
in class AbstractFactory
protected Logger getMonoLogger(java.lang.String name, java.lang.String resName)
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()
getLoggers
in interface LoggerFactory
getLoggers
in class AbstractFactory