Class org.as2lib.env.log.handler.ZtorLog4fHandler

org.as2lib.core.BasicClass
   +--org.as2lib.env.log.handler.AbstractLogHandler
      +--org.as2lib.env.log.handler.ZtorLog4fHandler

Implemented Interfaces

LogHandler

Description

ZtorLog4fHandler uses the Log4f.log method of the ZTOR Log4f project to log messages.

Method Index

new ZtorLog4fHandler()

getInstance(), write()

Inherited from BasicClass

toString()

Constructor Detail

ZtorLog4fHandler

public function ZtorLog4fHandler(messageStringifier:Stringifier)

Constructs a new ZtorLog4fHandler instance.

You can use one and the same instance for multiple loggers. So think about using the handler returned by the static getInstance method. Using this instance prevents the instantiation of unnecessary trace handlers and saves storage.

Parameters

messageStringifier(optional) the log message stringifier to use

Method Detail

getInstance

static public function getInstance(messageStringifier:Stringifier):ZtorLog4fHandler

Returns an instance of this class.

This method always returns the same instance.

The messageStringifier argument is only recognized on first invocation of this method.

Parameters

messageStringifier(optional) the log message stringifier to be used by the returned handler

Return

a ztor log4f handler

write

public function write(message:LogMessage):Void

Writes the passed-in message using the Log4f.log method.

The string representation of the message to log is obtained via the convertMessage method and passed as header to the Log4f.log method.

Parameters

messagethe message to log

Specified By

write() in org.as2lib.env.log.LogHandler