org.as2lib.core.BasicClass +--org.as2lib.env.log.handler.Bit101Handler
LogHandler
Bit101Handler
logs messages to the Bit-101 Debug Panel.
The Debug
class is needed.
public function Bit101Handler(decorateMessage:Boolean, recursionDepth:Number, indentation:Number)
Constructs a new Bit101Handler
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 bit-101 handlers and saves storage.
decorateMessage
is by default true
. Refer to the
Debug
class for information on the default recursionDepth
and
indentation
.
Note that messages are only logged recursively if decorateMessage
is
set to false
.
decorateMessage | (optional) determines whether to log the string returned
by the LogMessage.toString method or just the message returned by
LogMessage.getMessage
|
recursionDepth | (optional) determines the count of recursions for recursively traced objects |
indentation | (optional) determines the indentation number for recursively traced objects |
static public function getInstance(decorateMessage:Boolean, recursionDepth:Number, indentation:Number):Bit101Handler
Returns an instance of this class.
This method always returns the same instance.
Note that the arguments are only recognized on first call of this method and
are in this case used for construction of the Bit101Handler
instance.
decorateMessage | (optional) determines whether to log the string returned
by the LogMessage.toString method or just the message returned by
LogMessage.getMessage
|
recursionDepth | (optional) determines the count of recursions for recursively traced objects |
indentation | (optional) determines the indentation number for recursively traced objects |
a bit-101 handler
public function write(message:LogMessage):Void
Writes log messages to the Bit-101 Debug Panel.
Uses the LogMessage.toString method to obtain the string that is
logged if decorateMessage
is turned on. Otherwise the string returned
by the original message's toString
method is logged if it is of type
"string"
, "number"
, "boolean"
, "undefined"
or
"null"
or the original method is logged recursively if it is not of one
of the above types.
message | the message to log |