org.objectweb.util.monolog.wrapper.log4j

Class ConsoleHandler

Implemented Interfaces:
Handler

public class ConsoleHandler
extends ConsoleAppender
implements Handler

Author:
Sebastien Chassande-Barrioz

Field Summary

protected HashMap
prop
This fields contains the properties of the Handler

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

Constructor Summary

ConsoleHandler()
ConsoleHandler(String name)
It Builds a new ConsoleHandler.

Method Summary

Object
getAttribute(String key)
It retrieves the value of an attribute value of the handler.
String[]
getAttributeNames()
It retrieves the attributes of the handler
Map
getAttributes()
String
getType()
It retrieves the Handler type
Object
setAttribute(String key, Object value)
It assigns an attributte to the handler.
void
setAttributes(Map attributes)

Field Details

prop

protected HashMap prop
This fields contains the properties of the Handler

Constructor Details

ConsoleHandler

public ConsoleHandler()


ConsoleHandler

public ConsoleHandler(String name)
It Builds a new ConsoleHandler.

Parameters:
name - is the handler name.

Method Details

getAttribute

public Object getAttribute(String key)
It retrieves the value of an attribute value of the handler.
Specified by:
getAttribute in interface Handler

Parameters:


getAttributeNames

public String[] getAttributeNames()
It retrieves the attributes of the handler
Specified by:
getAttributeNames in interface Handler


getAttributes

public Map getAttributes()


getType

public String getType()
It retrieves the Handler type
Specified by:
getType in interface Handler


setAttribute

public Object setAttribute(String key,
                           Object value)
It assigns an attributte to the handler.
Specified by:
setAttribute in interface Handler

Parameters:
value - is the attribute value

Returns:
the old value is the attribute was already defined


setAttributes

public void setAttributes(Map attributes)