LogHandler
AscbHandler delegates the log message to the LogManager.log
method of the ASCB Logging API.
public 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.
static public function getInstance(Void):AscbHandlerReturns an instance of this class.
This method always returns the same instance.
a ascb handler
public function write(message:LogMessage):Void
Converts the passed-in message to a format that is expected formatters
of 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:
LogLevel returned by LogMessage.getLevel was converted to
this level number by the convertLevel method.
LogMessage.getMessage method.
LogMessage.getLoggerName
method.
Date instance
configured with the timestamp returned by the method
LogMessage.getTimeStamp.
message instance. This variable may be used by your
own formatter if you want to take advantage of the stringifier of the
LogMessage.
message | the message to log |