org.objectweb.util.monolog.wrapper.log4jMini

Class FileHandler

Implemented Interfaces:
Handler

public class FileHandler
extends FileAppender
implements Handler

This class is the wrapper to the org.apache.log4j.FileAppender

Author:
Sebastien Chassande-Barrioz

Field Summary

protected Hashtable
props
protected byte
type

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

FileHandler(byte type, String name)
It Builds a new MonologFileHandler.

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
String
getType()
It retrieves the Handler type
Object
setAttribute(String key, Object value)
It assigns an attributte to the handler.

Field Details

props

protected Hashtable props


type

protected byte type

Constructor Details

FileHandler

public FileHandler(byte type,
                   String name)
It Builds a new MonologFileHandler. It is needed to specify an handler type.

Parameters:
type - is the handler type. The possible values are the HandlerFactory.FILE_HANDLER_TYPE or HandlerFactory.CONSOLE_HANDLER_TYPE.

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


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