addHandlerToLogger
public void addHandlerToLogger(String handlerName,
String loggerName)
A TopicalLogger manages a list of Handler instances. This method
allows adding a handler to this list. The addHandler method returns
true only if the Handler did not exist
addTopicToLogger
public void addTopicToLogger(String topic,
String loggerName)
This method allows adding a topic to a TopicalLogger. This actions change
the hierarchical structure, but also the list of handlers. The list of handlers
of a TopicalLogger is composed of its handlers and all handlers inherited
from its parents. Adding a topic changes the inherited handlers list.
compareTo
public int compareTo(String levelname1,
String levelname2)
Compares two levels.
levelname1
- is the name of the first levellevelname2
- is the name of the second level
createHandler
public boolean createHandler(String hn,
String handlertype)
Creates a new handler
hn
- is the name of the handler to createhandlertype
- is the type of the parameter. The possible value are
defined in this interface by the XXX_HANDLER_TYPE constants.
- true if the handler has been created
defineLevel
public boolean defineLevel(String name,
String value)
It defines a new Level with a name and a string value. The string value
is analyzed to obtain the integer value.
name
- is the name of the new levelvalue
- is the string value of the new level
- true if the level has been created.
defineLevel
public boolean defineLevel(String name,
int value)
It defines a new Level with a name and an integer value.
name
- is the name of the new levelvalue
- is the integer value of the new level
- true if the level has been created.
getAllHandlerAttributes
public Map getAllHandlerAttributes()
It retrieves the attributes of all handlers
- Map(
String handlername,
Map(String attributename, String attributevalue)
)
getHandlerAttributes
public Map getHandlerAttributes(String handlername)
It retrieves the attributes of an handler
handlername
- is the name of the handler
- a map containing the association between an attribute name
(String) and an attribute value (String).
getHandlerNames
public String[] getHandlerNames()
It retrieves name of all handler managed by this factory.
getLevel
public Level getLevel(String name)
It retrieves a Level instance which the name is equals to the parameter.
name
- is the name of request Level
- a Leve instance or a null value if the level does not exist.
getLevel
public Level getLevel(int value)
It retrieves a Level instance which the integer value is equals to the
parameter.
value
- is the integer value of request Level
- a Leve instance or a null value if the level does not exist. As
it is possible to define several Levels which have the same integer value
this methods returns the Level instance of first name found in the list.
getLevels
public Level[] getLevels()
It retrieves all Level instances defined in this manager.
getLogger
public LoggerInfo getLogger(String loggername)
Creates a logger if it does not exist.
loggername
- is the name of the logger
getLogger
public LoggerInfo getLogger(String key,
String resourceBundleName)
Creates a logger if it does not exist.
resourceBundleName
- allows specifying the name of a
resource bundle in order to internationalise the logging.
getLoggers
public LoggerInfo[] getLoggers()
It retrieves a list of all loggers.
getMonologProperties
public Properties getMonologProperties()
getResourceBundleName
public String getResourceBundleName()
Accessors to a resource bundle name associated to a LoggerFactory.
removeAllHandlersFromLogger
public void removeAllHandlersFromLogger(String loggerName)
A TopicalLogger manages a list of Handler instances. This method
allows removing all handler.
removeHandler
public boolean removeHandler(String handlername)
It removes the handler which the name is specified by the parameter
handlername
- is the name of the handler
- true if the handler has been removed.
removeHandlerFromLogger
public void removeHandlerFromLogger(String handlerName,
String loggerName)
A TopicalLogger manages a list of Handler instances. This method
allows removing a handler to this list.
removeLevel
public void removeLevel(String name)
It removes a Level instance to this manager.
removeTopicFromLogger
public void removeTopicFromLogger(String topic,
String loggerName)
This method allows removing a topic to a TopicalLogger. This actions change
the hierarchical structure, but also the list of handlers. The list of handlers
of a TopicalLogger is composed of its handlers and all handlers inherited
from its parents. Removing a topic changes the inherited handlers list.
setAdditivity
public void setAdditivity(boolean a,
String loggerName)
It assigns the additivity flag for this logger instance.
setHandlerAttribute
public void setHandlerAttribute(String handlername,
String attributeName,
String value)
Assignes a value to an handler attribute.
handlername
- is the name of the handlerattributeName
- is the name of the attributevalue
- is the new value of the attribute
setResourceBundleName
public void setResourceBundleName(String resourceBundleName)
Accessors to a resource bundle name associated to a LoggerFactory.