public class MonologCategory extends java.lang.Object implements TopicalLogger
Modifier and Type | Class and Description |
---|---|
class |
MonologCategory.OwPriority |
Modifier and Type | Field and Description |
---|---|
protected org.apache.log4j.Category |
category |
protected boolean |
enable |
protected java.util.Hashtable |
handlers |
protected MonologCategory.OwPriority |
interPriority |
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
Constructor and Description |
---|
MonologCategory(org.apache.log4j.Category category) |
Modifier and Type | Method and Description |
---|---|
void |
addHandler(Handler h)
Add a handler in the Handler list of the topicalLogger
|
void |
addTopic(java.lang.String topic)
Add a topic to the 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()
Return the current Level of the logger
|
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()
Returns the list of the different names of the topicalLogger
|
java.lang.String |
getType()
It retrieves the Handler type
|
boolean |
isLoggable(int level)
Check if the level parameter are not filtered by the logger
|
boolean |
isLoggable(Level l)
Check if a message of the given level would actually be logged by this logger.
|
boolean |
isOn()
Is the handler enabled
|
void |
log(int level,
java.lang.Object o)
Log an object with a specific level.
|
void |
log(int level,
java.lang.Object o,
java.lang.Object location,
java.lang.Object method)
Log an object and a trowable with a specific level.
|
void |
log(int level,
java.lang.Object o,
java.lang.Throwable t)
Log an object and a trowable with a specific level.
|
void |
log(int level,
java.lang.Object o,
java.lang.Throwable t,
java.lang.Object location,
java.lang.Object method)
Log an object and a trowable with a specific level.
|
void |
log(Level l,
java.lang.Object o)
Log a message, with no arguments.
|
void |
log(Level l,
java.lang.Object o,
java.lang.Object location,
java.lang.Object method)
Log a message, with a location and method arguments.
|
void |
log(Level l,
java.lang.Object o,
java.lang.Throwable t)
Log a message, with a throwable arguments which can represent an
error or a context..
|
void |
log(Level l,
java.lang.Object o,
java.lang.Throwable t,
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)
Remove a handler from the Handler list of the topicalLogger
|
void |
removeTopic(java.lang.String topic)
Remove a topic from the 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 level)
Set the current level of the logger
|
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()
Disable the handler
|
void |
turnOn()
Enable the handler
|
protected java.util.Hashtable handlers
protected boolean enable
protected org.apache.log4j.Category category
protected MonologCategory.OwPriority interPriority
public void setIntLevel(int level)
setIntLevel
in interface Logger
public void setLevel(Level l)
Logger
public int getCurrentIntLevel()
getCurrentIntLevel
in interface Logger
public Level getCurrentLevel()
Logger
getCurrentLevel
in interface Logger
public boolean isLoggable(int level)
isLoggable
in interface Logger
public boolean isLoggable(Level l)
Logger
isLoggable
in interface Logger
public void log(int level, java.lang.Object o)
public void log(Level l, java.lang.Object o)
Logger
public void log(int level, java.lang.Object o, java.lang.Throwable t)
public void log(Level l, java.lang.Object o, java.lang.Throwable t)
Logger
public void log(int level, java.lang.Object o, java.lang.Object location, java.lang.Object method)
public void log(Level l, java.lang.Object o, java.lang.Object location, java.lang.Object method)
Logger
public void log(int level, java.lang.Object o, java.lang.Throwable t, java.lang.Object location, java.lang.Object method)
public void log(Level l, java.lang.Object o, java.lang.Throwable t, java.lang.Object location, java.lang.Object method)
Logger
public Handler[] getHandler()
TopicalLogger
getHandler
in interface TopicalLogger
public java.lang.String getName()
Handler
public Handler getHandler(java.lang.String hn)
TopicalLogger
getHandler
in interface TopicalLogger
public void setName(java.lang.String name)
Handler
public void removeAllHandlers() throws java.lang.Exception
TopicalLogger
removeAllHandlers
in interface TopicalLogger
java.lang.Exception
public java.lang.String getType()
Handler
public void setAdditivity(boolean a)
TopicalLogger
setAdditivity
in interface TopicalLogger
public java.lang.String[] getAttributeNames()
Handler
getAttributeNames
in interface Handler
public boolean getAdditivity()
TopicalLogger
getAdditivity
in interface TopicalLogger
public java.lang.Object getAttribute(java.lang.String name)
Handler
getAttribute
in interface Handler
name
- is an attribute namepublic java.lang.String[] getTopic()
TopicalLogger
getTopic
in interface TopicalLogger
public java.lang.Object setAttribute(java.lang.String name, java.lang.Object value)
Handler
setAttribute
in interface Handler
name
- is the attribute namevalue
- is the attribute valuepublic void addHandler(Handler h) throws java.lang.Exception
addHandler
in interface TopicalLogger
java.lang.Exception
public void addTopic(java.lang.String topic) throws java.lang.Exception
addTopic
in interface TopicalLogger
java.lang.Exception
public java.util.Enumeration getTopics()
getTopics
in interface TopicalLogger
public void removeHandler(Handler h) throws java.lang.Exception
removeHandler
in interface TopicalLogger
java.lang.Exception
public void removeTopic(java.lang.String topic) throws java.lang.Exception
removeTopic
in interface TopicalLogger
java.lang.Exception