Interface org.as2lib.env.log.ConfigurableLogger

org.as2lib.core.BasicInterface
   +--org.as2lib.env.log.Logger
      +--org.as2lib.env.log.ConfigurableLogger

Description

ConfigurableLogger declares methods needed to configure most loggers.

This is first the method to set the level setLevel and second the methods to add, remove and access handlers addHandler, removeHandler, removeAllHandlers and getAllHandlers.

Log handlers are responsible for making the actual output. There are a few pre-defined handlers that can be used to log to different output devices. Take a look at the org.as2lib.env.log.handler package for these.

Loggers are normally configured only once.

Method Index

addHandler(), getAllHandlers(), getLevel(), removeAllHandlers(), removeHandler(), setLevel()

Inherited from Logger

debug(), error(), fatal(), info(), isDebugEnabled(), isErrorEnabled(), isFatalEnabled(), isInfoEnabled(), isWarningEnabled(), warning()

Inherited from BasicInterface

toString()

Method Detail

getLevel

public function getLevel(Void):LogLevel

Returns the set level.

Return

the set level

setLevel

public function setLevel(level:LogLevel):Void

Sets the log level.

The level determines which output to make and and which to make not.

Parameters

levelthe new level to control the output

addHandler

public function addHandler(handler:LogHandler):Void

Adds the passed-in log handler.

Log handlers are used to actually log the messages. They determine what information to log and to which output device.

Parameters

handlerthe new log handler to log messages

getAllHandlers

public function getAllHandlers(Void):Array

Returns all handlers that were added to this logger.

Return

all added log handlers

removeHandler

public function removeHandler(handler:LogHandler):Void

Removes all occerrences of the passed-in handler.

Parameters

handlerthe log handler to remove

removeAllHandlers

public function removeAllHandlers(Void):Void

Removes all added log handlers.