|
||||||||||||
| 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
| Field Summary | |
|---|---|
static boolean |
debug
Inidicates if the monolog wrapper must be logged itself. |
protected java.util.Map |
handlers
This field references the handler instance by their names. key = a String object which is an handler name. |
static java.lang.String[][] |
handlerType2className
|
static java.lang.String[] |
handlerTypes
|
protected java.util.Map |
intToNames
This field reference the level names by their integer value. key = a java.lang.Integer which the value is the level value = a String or an ArrayList of String. |
protected java.util.Collection |
monologFactoryListeners
This field references the MonolgFactoryListener instance by their names. key = a String object which is an handler name. |
protected java.util.Map |
nameToLevel
This field references the level instances by their names. key = a level name value = the unique Level instance linked to the name. |
protected java.lang.String |
resourceBundleName
The default resource bundle of this factory |
| 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 | |
|---|---|
AbstractFactory()
It initializes the default monolog level: INHERIT, DEBUG, INFO, WARN, ERROR, FATAL |
|
| Method Summary | |
|---|---|
void |
addMonologFactoryListener(MonologFactoryListener mfl)
register a listener for the events of this MonologFactory |
abstract void |
configure(java.util.Properties prop)
This method permits to order to a monolog wrapper to configure the underlying log system. |
Handler |
createHandler(java.lang.String hn,
java.lang.String handlertype)
It retrieves a new instance of an handler which the type is specified by the parameter. |
static void |
debug(java.lang.String m)
This method must be only used to debug the Monolog wrappers. |
Level |
defineLevel(java.lang.String name,
int value)
It defines a new Level with a name and an integer value. |
Level |
defineLevel(java.lang.String name,
java.lang.String value)
It defines a new Level with a name and a string value. |
protected abstract java.lang.String[][] |
getDefaultHandlerType2className()
|
Handler |
getHandler(java.lang.String hn)
It retrieves the handler which the name is specified by the parameter |
Handler[] |
getHandlers()
It retrieves all handler managed by this factory. |
Level |
getLevel(int value)
It retrieves a Level instance which the integer value is equals to the parameter. |
Level |
getLevel(java.lang.String name)
It retrieves a Level instance which the name is equals to the parameter. |
Level[] |
getLevels()
It retrieves all Level instances defined in this manager. |
abstract Logger |
getLogger(java.lang.String key)
This method permits to fetch a Logger. |
abstract Logger[] |
getLoggers()
It retrieves a list of all loggers. |
java.lang.String |
getResourceBundleName()
Accessors to a resource bundle name associated to a LoggerFactory. |
abstract java.lang.String |
getWrapperName()
|
protected void |
initHandlerType2className()
|
Handler |
removeHandler(java.lang.String hn)
It removes the handler which the name is specified by the parameter |
void |
removeLevel(java.lang.String name)
It removes a Level instance to this manager. |
void |
removeMonologFactoryListener(MonologFactoryListener mfl)
forget a listener for the events of this MonologFactory |
void |
setResourceBundleName(java.lang.String rbn)
Accessors to a resource bundle name associated to a LoggerFactory. |
static void |
warn(java.lang.String m)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.objectweb.util.monolog.api.LoggerFactory |
|---|
getLogger |
| Field Detail |
public static java.lang.String[] handlerTypes
public static java.lang.String[][] handlerType2className
public static boolean debug
protected java.lang.String resourceBundleName
protected java.util.Map nameToLevel
protected java.util.Map intToNames
protected java.util.Map handlers
protected java.util.Collection monologFactoryListeners
| Constructor Detail |
public AbstractFactory()
| Method Detail |
public static void debug(java.lang.String m)
m - the message to log.public static void warn(java.lang.String m)
public abstract java.lang.String getWrapperName()
protected void initHandlerType2className()
protected abstract java.lang.String[][] getDefaultHandlerType2className()
public abstract void configure(java.util.Properties prop)
throws java.lang.Exception
MonologFactory
configure in interface MonologFactoryprop - contains properties which describes the way to configure.
In particular three properties could be used:
java.lang.Exceptionpublic abstract Logger getLogger(java.lang.String key)
LoggerFactory
getLogger in interface LoggerFactorypublic abstract Logger[] getLoggers()
LoggerFactory
getLoggers in interface LoggerFactorypublic java.lang.String getResourceBundleName()
LoggerFactory
getResourceBundleName in interface LoggerFactorypublic void setResourceBundleName(java.lang.String rbn)
LoggerFactory
setResourceBundleName in interface LoggerFactory
public Handler createHandler(java.lang.String hn,
java.lang.String handlertype)
HandlerFactory
createHandler in interface HandlerFactoryhandlertype - is the type of the parameter. The possible value are
defined in this interface by the XXX_HANDLER_TYPE constants.
public Handler[] getHandlers()
HandlerFactory
getHandlers in interface HandlerFactorypublic Handler getHandler(java.lang.String hn)
HandlerFactory
getHandler in interface HandlerFactoryhn - is the name of the handler
public Handler removeHandler(java.lang.String hn)
HandlerFactory
removeHandler in interface HandlerFactoryhn - is the name of the handler
public Level defineLevel(java.lang.String name,
int value)
LevelFactory
defineLevel in interface LevelFactoryname - is the name of the new levelvalue - is the integer value of the new level
public Level defineLevel(java.lang.String name,
java.lang.String value)
LevelFactory
defineLevel in interface LevelFactoryname - is the name of the new levelvalue - is the string value of the new level
public Level getLevel(java.lang.String name)
LevelFactory
getLevel in interface LevelFactoryname - is the name of request Level
public Level getLevel(int value)
LevelFactory
getLevel in interface LevelFactoryvalue - is the integer value of request Level
public Level[] getLevels()
LevelFactory
getLevels in interface LevelFactorypublic void removeLevel(java.lang.String name)
LevelFactory
removeLevel in interface LevelFactorypublic void addMonologFactoryListener(MonologFactoryListener mfl)
MonologFactory
addMonologFactoryListener in interface MonologFactorypublic void removeMonologFactoryListener(MonologFactoryListener mfl)
MonologFactory
removeMonologFactoryListener in interface MonologFactory
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||