AscbHandler
| Kind of class: | class |
|---|---|
| Inherits from: | BasicClass |
| Implements: | |
| Author: | Simon Wacker |
| Classpath: | org.as2lib.env.log.handler.AscbHandler |
| File last modified: | Sunday, 26 June 2005, 13:58:26 |
AscbHandler delegates the log message to the LogManager.logmethod of the ASCB Logging API.
Summary
Constructor
Class methods
Constructor
AscbHandler
function AscbHandler (
Void)
Constructs a new
AscbHandler 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 ascb handlers and saves
storage.
Class methods
getInstance
static function getInstance (
Void) : AscbHandler
Returns an instance of this class.
This method always returns the same instance.
Returns:
a ascb handler
Instance methods
write
function write (
message:LogMessage) : Void
Converts the passed-in
of the ASCB Logging API and passes the converted message to the
message to a format that is expected formattersof the ASCB Logging API and passes the converted message to the
LogManager.log method of the ASCB Logging API.The converted object has the following variables:
- level
ASCB Logging API level number of the message. The former As2lib
LogLevelreturned byLogMessage.getLevelwas converted to
this level number by the convertLevel method.
- message
The actual message to log. That is the message returned by the
LogMessage.getMessagemethod.
- name
The name of the logger returned by theLogMessage.getLoggerName
method.
- time
The time when the logging took place. This is aDateinstance
configured with the timestamp returned by the method
LogMessage.getTimeStamp.
- logMessage
The passed-inmessageinstance. This variable may be used by your
own formatter if you want to take advantage of the stringifier of the
LogMessage.
Parameters:
message:
the message to log
Specified by: