|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.objectweb.util.monolog.wrapper.config.BasicLogger
This class is a basic implementatio of the TopicalLogger interface. It is not linked to any underlying log system. The log methods do nothing. Only the configuration aspect is treated. Therefore all the logger structure is stored into internal struture.
| Field Summary | |
|---|---|
protected java.util.HashMap |
handlers
This fields references by their name the handlers associated to the logger. |
protected Level |
level
The current level of the logger. |
protected LevelFactory |
levelFactory
This field references the level factory. |
protected java.util.ArrayList |
topics
The fields lists all topics the logger. |
| 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, JMX_HANDLER_TYPE, LEVEL_ATTRIBUTE, LOGGER_HANDLER_TYPE, MAX_SIZE_ATTRIBUTE, OUTPUT_ATTRIBUTE, PATTERN_ATTRIBUTE, ROLLING_FILE_HANDLER_TYPE |
| Method Summary | |
|---|---|
void |
addHandler(Handler h)
A TopicalLogger manages a list of Handler instances. |
void |
addTopic(java.lang.String topic)
This method allows adding a topic to a TopicalLogger. |
boolean |
getAdditivity()
It retrieves the additivity flag for this logger instance. |
java.lang.Object |
getAttribute(java.lang.String name)
It retrieves the value of an attribute value of the handler. |
java.lang.String[] |
getAttributeNames()
It retrieves the attributes of the handler |
int |
getCurrentIntLevel()
Returns the current level value under the integer format |
Level |
getCurrentLevel()
Returns the current level value under the Level format |
Handler[] |
getHandler()
It returns the list of the handler associated to this logger. |
Handler |
getHandler(java.lang.String hn)
It returns the handler which the name is equals to the parameter |
java.lang.String |
getName()
It retrieves the name of the handler |
java.lang.String[] |
getTopic()
This method allows getting a topic list of this TopicalLogger. |
java.util.Enumeration |
getTopics()
TODO |
java.lang.String |
getType()
It retrieves the Handler type |
boolean |
isLoggable(int level)
Check if a message of the given level would actually be logged by this logger. |
boolean |
isLoggable(Level l)
Check if a message of the given level would actually be logged by this logger. |
boolean |
isOn()
Check if this logger is enabled. |
void |
log(int level,
java.lang.Object message)
Log a message, with no arguments. |
void |
log(int level,
java.lang.Object message,
java.lang.Object location,
java.lang.Object method)
Log a message, with a location and method arguments. |
void |
log(int level,
java.lang.Object message,
java.lang.Throwable throwable)
Log a message, with a throwable arguments which can represent an error or a context.. |
void |
log(int level,
java.lang.Object message,
java.lang.Throwable throwable,
java.lang.Object location,
java.lang.Object method)
Log a message, with a location, method and throwable arguments. |
void |
log(Level level,
java.lang.Object message)
Log a message, with no arguments. |
void |
log(Level l,
java.lang.Object message,
java.lang.Object location,
java.lang.Object method)
Log a message, with a location and method arguments. |
void |
log(Level level,
java.lang.Object message,
java.lang.Throwable throwable)
Log a message, with a throwable arguments which can represent an error or a context.. |
void |
log(Level level,
java.lang.Object message,
java.lang.Throwable throwable,
java.lang.Object location,
java.lang.Object method)
Log a message, with a location, method and throwable arguments. |
void |
removeAllHandlers()
A TopicalLogger manages a list of Handler instances. |
void |
removeHandler(Handler h)
A TopicalLogger manages a list of Handler instances. |
void |
removeTopic(java.lang.String topic)
This method allows removing a topic to a TopicalLogger. |
void |
setAdditivity(boolean a)
It assigns the additivity flag for this logger instance. |
java.lang.Object |
setAttribute(java.lang.String name,
java.lang.Object value)
It assigns an attributte to the handler. |
void |
setIntLevel(int l)
Permits to set the level with an integer value |
void |
setLevel(Level l)
Permits to set the level with a Level instance. |
void |
setName(java.lang.String name)
It assigns the name of the handler |
void |
turnOff()
Disables this logger |
void |
turnOn()
Enables this logger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.HashMap handlers
protected java.util.ArrayList topics
protected LevelFactory levelFactory
protected Level level
| Method Detail |
public void addHandler(Handler h)
throws java.lang.Exception
TopicalLogger
addHandler in interface TopicalLoggerjava.lang.Exception
public void removeHandler(Handler h)
throws java.lang.Exception
TopicalLogger
removeHandler in interface TopicalLoggerjava.lang.Exceptionpublic Handler[] getHandler()
TopicalLogger
getHandler in interface TopicalLoggerpublic Handler getHandler(java.lang.String hn)
TopicalLogger
getHandler in interface TopicalLogger
public void removeAllHandlers()
throws java.lang.Exception
TopicalLogger
removeAllHandlers in interface TopicalLoggerjava.lang.Exceptionpublic void setAdditivity(boolean a)
TopicalLogger
setAdditivity in interface TopicalLoggerpublic boolean getAdditivity()
TopicalLogger
getAdditivity in interface TopicalLogger
public void addTopic(java.lang.String topic)
throws java.lang.Exception
TopicalLogger
addTopic in interface TopicalLoggerjava.lang.Exceptionpublic java.util.Enumeration getTopics()
getTopics in interface TopicalLoggerpublic java.lang.String[] getTopic()
TopicalLogger
getTopic in interface TopicalLogger
public void removeTopic(java.lang.String topic)
throws java.lang.Exception
TopicalLogger
removeTopic in interface TopicalLoggerjava.lang.Exceptionpublic java.lang.String getName()
Handler
getName in interface Handlerpublic void setName(java.lang.String name)
Handler
setName in interface Handlerpublic java.lang.String getType()
Handler
getType in interface Handlerpublic java.lang.String[] getAttributeNames()
Handler
getAttributeNames in interface Handlerpublic java.lang.Object getAttribute(java.lang.String name)
Handler
getAttribute in interface Handlername - is an attribute name
public java.lang.Object setAttribute(java.lang.String name,
java.lang.Object value)
Handler
setAttribute in interface Handlername - is the attribute namevalue - is the attribute value
public void setIntLevel(int l)
Logger
setIntLevel in interface Loggerpublic void setLevel(Level l)
Logger
setLevel in interface Loggerpublic int getCurrentIntLevel()
Logger
getCurrentIntLevel in interface Loggerpublic Level getCurrentLevel()
Logger
getCurrentLevel in interface Loggerpublic boolean isLoggable(int level)
Logger
isLoggable in interface Loggerpublic boolean isLoggable(Level l)
Logger
isLoggable in interface Loggerpublic boolean isOn()
Logger
isOn in interface Logger
public void log(int level,
java.lang.Object message)
Logger
log in interface Logger
public void log(Level level,
java.lang.Object message)
Logger
log in interface Logger
public void log(int level,
java.lang.Object message,
java.lang.Throwable throwable)
Logger
log in interface Logger
public void log(Level level,
java.lang.Object message,
java.lang.Throwable throwable)
Logger
log in interface Logger
public void log(int level,
java.lang.Object message,
java.lang.Object location,
java.lang.Object method)
Logger
log in interface Logger
public void log(Level l,
java.lang.Object message,
java.lang.Object location,
java.lang.Object method)
Logger
log in interface Logger
public void log(int level,
java.lang.Object message,
java.lang.Throwable throwable,
java.lang.Object location,
java.lang.Object method)
Logger
log in interface Logger
public void log(Level level,
java.lang.Object message,
java.lang.Throwable throwable,
java.lang.Object location,
java.lang.Object method)
Logger
log in interface Loggerpublic void turnOn()
Logger
turnOn in interface Loggerpublic void turnOff()
Logger
turnOff in interface Logger
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||