|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.objectweb.util.monolog.wrapper.config.BasicFactory
public class BasicFactory
This class is a basic implementation of the monolog factories (HandlerFactory, LoggerFactory and LevelFactory). It does not linked to an any underlying log system.
| Field Summary | |
|---|---|
protected HashMap |
handlers
This field references the handler instance by their names. key = a String object which is an handler name. |
protected HashMap |
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 HashMap |
loggers
This field references the handler instance by their names. key = a String object which is a logger topic. |
protected HashMap |
nameToLevel
This field references the level instances by their names. key = a level name value = the unique Level instance linked to the name. |
protected String |
resourceBundleName
The resource bundle linked to the LoggerFactory. |
| 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 | |
|---|---|
BasicFactory()
It intializes the data struture, defines the default level and the root logger. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HashMap nameToLevel
protected HashMap intToNames
protected HashMap handlers
protected HashMap loggers
protected String resourceBundleName
| Constructor Detail |
|---|
public BasicFactory()
| Method Detail |
|---|
protected void defineDefaultLevels()
protected void defineRootLogger()
public void addMonologFactoryListener(MonologFactoryListener mfl)
addMonologFactoryListener in interface MonologFactorypublic void removeMonologFactoryListener(MonologFactoryListener mfl)
removeMonologFactoryListener in interface MonologFactory
public Level defineLevel(String name,
int value)
defineLevel in interface LevelFactory
public Level defineLevel(String name,
String value)
defineLevel in interface LevelFactorypublic Level getLevel(String name)
getLevel in interface LevelFactorypublic Level getLevel(int value)
getLevel in interface LevelFactorypublic Level[] getLevels()
getLevels in interface LevelFactorypublic void removeLevel(String name)
removeLevel in interface LevelFactory
public void configure(Properties prop)
throws Exception
configure in interface MonologFactoryExceptionpublic Logger getLogger(String _key)
getLogger in interface LoggerFactorypublic void removeLogger(Logger logger)
public Logger getLogger(String key,
String resourceBundleName)
getLogger in interface LoggerFactorypublic String getResourceBundleName()
getResourceBundleName in interface LoggerFactorypublic void setResourceBundleName(String rbn)
setResourceBundleName in interface LoggerFactorypublic Logger[] getLoggers()
getLoggers in interface LoggerFactorypublic String getTopicPrefix()
getTopicPrefix in interface LoggerFactory
public Handler createHandler(String hn,
String handlertype)
createHandler in interface HandlerFactorypublic Handler[] getHandlers()
getHandlers in interface HandlerFactorypublic Handler getHandler(String hn)
getHandler in interface HandlerFactorypublic Handler removeHandler(String hn)
removeHandler in interface HandlerFactory
public void addLogInfo(Character pattern,
LogInfo logInfoProvider)
addLogInfo in interface MonologFactorypattern - Character corresponding to the info to addlogInfoProvider - instance of info providerpublic void removeLogInfo(char pattern)
removeLogInfo in interface MonologFactorypattern - log info patternpublic LogInfo getLogInfo(Character pattern)
getLogInfo in interface MonologFactorypattern -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||