org.objectweb.util.monolog.api

Interface Handler

Known Subinterfaces:
Logger, TopicalLogger
Known Implementing Classes:
BasicHandler, BasicLogger, ConsoleHandler, FileHandler, FileHandler, GenericHandler, GenericHandler, Logger, LoggerImpl, MonologCategory, MonologCategory, NTEventLogHandler, RollingFileHandler

public interface Handler

Handler is an output. For example a handler might be a console, a file, a socket, or a Logger.

Author:
Sebastien Chassande-Barrioz

Field Summary

static String
APPEND_MODE_ATTRIBUTE
static String
BUFFER_ATTRIBUTE
static byte
CONSOLE_HANDLER_TYPE
Deprecated. the type is a string now: "console"
static byte
FILE_HANDLER_TYPE
Deprecated. the type is a string now: "file"
static String
FILE_NUMBER_ATTRIBUTE
static byte
GENERIC_HANDLER_TYPE
Deprecated. the type is a string now: "generic"
static String
LEVEL_ATTRIBUTE
static byte
LOGGER_HANDLER_TYPE
Deprecated. the type is a string now: "logger"
static String
MAX_SIZE_ATTRIBUTE
static String
OUTPUT_ATTRIBUTE
static String
PATTERN_ATTRIBUTE
static byte
ROLLING_FILE_HANDLER_TYPE
This constant is used to represent an handler which stores message into several files.

Method Summary

Object
getAttribute(String name)
It retrieves the value of an attribute value of the handler.
String[]
getAttributeNames()
It retrieves the attributes of the handler
String
getName()
It retrieves the name of the handler
String
getType()
It retrieves the Handler type
Object
setAttribute(String name, Object value)
It assigns an attributte to the handler.
void
setName(String name)
It assigns the name of the handler

Field Details

APPEND_MODE_ATTRIBUTE

public static final String APPEND_MODE_ATTRIBUTE


BUFFER_ATTRIBUTE

public static final String BUFFER_ATTRIBUTE


CONSOLE_HANDLER_TYPE

public static final byte CONSOLE_HANDLER_TYPE

Deprecated. the type is a string now: "console"

This constant is used to represent an handler which prints message on a console.

Field Value:
2


FILE_HANDLER_TYPE

public static final byte FILE_HANDLER_TYPE

Deprecated. the type is a string now: "file"

This constant is used to represent an handler which stores message into one file.

Field Value:
1


FILE_NUMBER_ATTRIBUTE

public static final String FILE_NUMBER_ATTRIBUTE


GENERIC_HANDLER_TYPE

public static final byte GENERIC_HANDLER_TYPE

Deprecated. the type is a string now: "generic"

This constant is used to represent an handler which stores message into several files.

Field Value:
4


LEVEL_ATTRIBUTE

public static final String LEVEL_ATTRIBUTE


LOGGER_HANDLER_TYPE

public static final byte LOGGER_HANDLER_TYPE

Deprecated. the type is a string now: "logger"

This constant is used to represent an handler which is a Logger.

Field Value:
5


MAX_SIZE_ATTRIBUTE

public static final String MAX_SIZE_ATTRIBUTE


OUTPUT_ATTRIBUTE

public static final String OUTPUT_ATTRIBUTE


PATTERN_ATTRIBUTE

public static final String PATTERN_ATTRIBUTE


ROLLING_FILE_HANDLER_TYPE

public static final byte ROLLING_FILE_HANDLER_TYPE
This constant is used to represent an handler which stores message into several files.

Field Value:
3

Method Details

getAttribute

public Object getAttribute(String name)
It retrieves the value of an attribute value of the handler.

Parameters:
name - is an attribute name


getAttributeNames

public String[] getAttributeNames()
It retrieves the attributes of the handler


getName

public String getName()
It retrieves the name of the handler


getType

public String getType()
It retrieves the Handler type


setAttribute

public Object setAttribute(String name,
                           Object value)
It assigns an attributte to the handler.

Parameters:
name - is the attribute name
value - is the attribute value

Returns:
the old value is the attribute was already defined


setName

public void setName(String name)
It assigns the name of the handler