Access keys

Bit101Handler

Kind of class: class
Inherits from: BasicClass
Implements:
Author: Simon Wacker
Classpath: org.as2lib.env.log.handler.Bit101Handler
File last modified: Sunday, 10 April 2005, 10:34:10
Bit101Handler logs messages to the Bit-101 Debug Panel.

The Debug class is needed.

Summary

Constructor
Class methods
Instance methods
Instance methods inherited from BasicClass

Constructor

Bit101Handler

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.

Parameters:
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

Class methods

getInstance

static 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.

Parameters:
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
Returns:
a bit-101 handler

Instance methods

write

function write (
message:LogMessage) : Void
Writes log messages to the Bit-101 Debug Panel.

Uses the org.as2lib.env.log.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.

Parameters:
message:
the message to log