Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.objectweb.util.monolog.wrapper.config.BasicLogger
Field Summary | |
protected HashMap |
|
protected Level |
|
protected LevelFactory |
|
protected ArrayList |
|
Fields inherited from interface org.objectweb.util.monolog.api.Handler | |
APPEND_MODE_ATTRIBUTE , BUFFER_ATTRIBUTE , CONSOLE_HANDLER_TYPE , FILE_HANDLER_TYPE , FILE_NUMBER_ATTRIBUTE , GENERIC_HANDLER_TYPE , LEVEL_ATTRIBUTE , LOGGER_HANDLER_TYPE , MAX_SIZE_ATTRIBUTE , OUTPUT_ATTRIBUTE , PATTERN_ATTRIBUTE , ROLLING_FILE_HANDLER_TYPE |
Method Summary | |
void |
|
void |
|
boolean |
|
Object |
|
String[] | |
int |
|
Level |
|
Handler[] |
|
Handler |
|
String |
|
String[] |
|
Enumeration |
|
String |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void | |
void | |
void | |
void | |
void |
|
void |
|
void |
|
void |
|
Object |
|
void |
|
void | |
void |
|
void |
|
void |
|
protected HashMap handlers
This fields references by their name the handlers associated to the logger. key = a handler name value = a Handler instance
protected ArrayList topics
The fields lists all topics the logger.
public void addHandler(Handler h) throws Exception
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
- Specified by:
- addHandler in interface TopicalLogger
public void addTopic(String topic) throws Exception
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.
- Specified by:
- addTopic in interface TopicalLogger
public boolean getAdditivity()
It retrieves the additivity flag for this logger instance.
- Specified by:
- getAdditivity in interface TopicalLogger
public String[] getAttributeNames()
- Specified by:
- getAttributeNames in interface Handler
public int getCurrentIntLevel()
Returns the current level value under the integer format
- Specified by:
- getCurrentIntLevel in interface Logger
public Level getCurrentLevel()
Returns the current level value under the Level format
- Specified by:
- getCurrentLevel in interface Logger
public Handler[] getHandler()
It returns the list of the handler associated to this logger.
- Specified by:
- getHandler in interface TopicalLogger
- Returns:
- an array of Handler or an empty array.
public Handler getHandler(String hn)
It returns the handler which the name is equals to the parameter
- Specified by:
- getHandler in interface TopicalLogger
- Returns:
- an Handler or a null value.
public String[] getTopic()
This method allows getting a topic list of this TopicalLogger.
- Specified by:
- getTopic in interface TopicalLogger
public boolean isLoggable(int level)
Check if a message of the given level would actually be logged by this logger.
- Specified by:
- isLoggable in interface Logger
public boolean isLoggable(Level l)
Check if a message of the given level would actually be logged by this logger.
- Specified by:
- isLoggable in interface Logger
public void log(int level, Object message)
Log a message, with no arguments. If the logger is currently enabled for the given message level then the given message is treated
public void log(int level, Object message, Object location, Object method)
Log a message, with a location and method arguments. The location parameter can be the object instance which logs the event, or a string representation of the object. The method argument can be a java.lang.reflect.Method or a string which represents the method name.
public void log(int level, Object message, Throwable throwable)
Log a message, with a throwable arguments which can represent an error or a context..
public void log(int level, Object message, Throwable throwable, Object location, Object method)
Log a message, with a location, method and throwable arguments. The location parameter can be the object instance which logs the event, or a string representation of the object.. The method argument can be a java.lang.reflect.Method or a string which represents the method name. The throwable parameter permits to log an Exception.
public void log(Level level, Object message)
Log a message, with no arguments. If the logger is currently enabled for the given message level then the given message is treated
public void log(Level l, Object message, Object location, Object method)
Log a message, with a location and method arguments. The location parameter can be the object instance which logs the event, or a string representation of the object. The method argument can be a java.lang.reflect.Method or a string which represents the method name.
public void log(Level level, Object message, Throwable throwable)
Log a message, with a throwable arguments which can represent an error or a context..
public void log(Level level, Object message, Throwable throwable, Object location, Object method)
Log a message, with a location, method and throwable arguments. The location parameter can be the object instance which logs the event, or a string representation of the object.. The method argument can be a java.lang.reflect.Method or a string which represents the method name. The throwable parameter permits to log an Exception.
public void removeAllHandlers() throws Exception
A TopicalLogger manages a list of Handler instances. This method allows removing all handler.
- Specified by:
- removeAllHandlers in interface TopicalLogger
public void removeHandler(Handler h) throws Exception
A TopicalLogger manages a list of Handler instances. This method allows removing a handler to this list.
- Specified by:
- removeHandler in interface TopicalLogger
public void removeTopic(String topic) throws Exception
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.
- Specified by:
- removeTopic in interface TopicalLogger
public void setAdditivity(boolean a)
It assigns the additivity flag for this logger instance.
- Specified by:
- setAdditivity in interface TopicalLogger
public Object setAttribute(String name, Object value)
- Specified by:
- setAttribute in interface Handler
public void setIntLevel(int l)
Permits to set the level with an integer value
- Specified by:
- setIntLevel in interface Logger