org.objectweb.util.monolog.wrapper.log4j
Class ConsoleHandler
java.lang.Object
org.apache.log4j.AppenderSkeleton
org.apache.log4j.WriterAppender
org.apache.log4j.ConsoleAppender
org.objectweb.util.monolog.wrapper.log4j.ConsoleHandler
- All Implemented Interfaces:
- org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler, Handler
public class ConsoleHandler
- extends org.apache.log4j.ConsoleAppender
- implements Handler
- Author:
- Sebastien Chassande-Barrioz
Field Summary |
protected java.util.HashMap |
prop
This fields contains the properties of the Handler |
Fields inherited from class org.apache.log4j.ConsoleAppender |
SYSTEM_ERR, SYSTEM_OUT, target |
Fields inherited from class org.apache.log4j.WriterAppender |
encoding, immediateFlush, qw |
Fields inherited from class org.apache.log4j.AppenderSkeleton |
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
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 |
java.lang.Object |
getAttribute(java.lang.String key)
It retrieves the value of an attribute value of the handler. |
java.lang.String[] |
getAttributeNames()
It retrieves the attributes of the handler |
java.util.Map |
getAttributes()
|
java.lang.String |
getType()
It retrieves the Handler type |
java.lang.Object |
setAttribute(java.lang.String key,
java.lang.Object value)
It assigns an attributte to the handler. |
void |
setAttributes(java.util.Map attributes)
|
Methods inherited from class org.apache.log4j.ConsoleAppender |
activateOptions, closeWriter, getFollow, getTarget, setFollow, setTarget |
Methods inherited from class org.apache.log4j.WriterAppender |
append, checkEntryConditions, close, createWriter, getEncoding, getImmediateFlush, requiresLayout, reset, setEncoding, setErrorHandler, setImmediateFlush, setWriter, subAppend, writeFooter, writeHeader |
Methods inherited from class org.apache.log4j.AppenderSkeleton |
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setLayout, setName, setThreshold |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prop
protected java.util.HashMap prop
- This fields contains the properties of the Handler
ConsoleHandler
public ConsoleHandler()
ConsoleHandler
public ConsoleHandler(java.lang.String name)
- It Builds a new ConsoleHandler.
- Parameters:
name
- is the handler name.
getAttributes
public java.util.Map getAttributes()
setAttributes
public void setAttributes(java.util.Map attributes)
getType
public java.lang.String getType()
- Description copied from interface:
Handler
- It retrieves the Handler type
- Specified by:
getType
in interface Handler
getAttributeNames
public java.lang.String[] getAttributeNames()
- Description copied from interface:
Handler
- It retrieves the attributes of the handler
- Specified by:
getAttributeNames
in interface Handler
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
- Description copied from interface:
Handler
- It retrieves the value of an attribute value of the handler.
- Specified by:
getAttribute
in interface Handler
- Parameters:
key
- is an attribute name
setAttribute
public java.lang.Object setAttribute(java.lang.String key,
java.lang.Object value)
- Description copied from interface:
Handler
- It assigns an attributte to the handler.
- Specified by:
setAttribute
in interface Handler
- Parameters:
key
- is the attribute namevalue
- is the attribute value
- Returns:
- the old value is the attribute was already defined