Logger
Bit101Logger delegates all log messages to the Debug.trace
method from Keith Peter's Debug Panel.
Using this class instead of the Debug class in your application
directly enables you to switch between almost every available Logging API
without having to change the logging calls but just the underlying configuration
on startup.
new Bit101Logger()public function Bit101Logger(traceObject:Boolean, recursionDepth:Number, indentation:Number)
Constructs a new Bit101Logger instance.
The default log level is ALL. This means all messages regardless of
their level are logged.
traceObject is by default false. Refer to the Debug
class for information on the default recursionDepth and
indentation.
traceObject | (optional) determines whether to trace objects recursively
or to use the result of their toString method
|
recursionDepth | (optional) determines the count of recursions for recursively traced objects |
indentation | (optional) determines the indentation number for recursively traced objects |
public function setLevel(level:LogLevel):VoidSets the log level.
The log level determines which messages are logged and which are not.
A level of value null or undefined is interpreted as level
ALL, which is also the default level.
level | the new log level |
public function isDebugEnabled(Void):BooleanChecks if this logger is enabled for debug level messages.
true if debug messages are logged
isDebugEnabled() in org.as2lib.env.log.Logger
public function isInfoEnabled(Void):BooleanChecks if this logger is enabled for info level messages.
true if info messages are logged
isInfoEnabled() in org.as2lib.env.log.Logger
public function isWarningEnabled(Void):BooleanChecks if this logger is enabled for warning level messages.
true if warning messages are logged
isWarningEnabled() in org.as2lib.env.log.Logger
public function isErrorEnabled(Void):BooleanChecks if this logger is enabled for error level messages.
true if error messages are logged
isErrorEnabled() in org.as2lib.env.log.Logger
public function isFatalEnabled(Void):BooleanChecks if this logger is enabled for fatal level messages.
true if fatal messages are logged
isFatalEnabled() in org.as2lib.env.log.Logger
public function log(message):Void
Logs the message using the Debug.trace method if
traceObject is turned off or if the message is of type
"string", "number", "boolean", "undefined" or
"null" and using the Debug.traceObject method if neither of the
above cases holds true.
message | the message to log |
public function debug(message):Void
Logs the passed-in message at debug level.
The message is only logged when the level is set to DEBUG or
a level above.
message | the message object to log |
debug() in org.as2lib.env.log.Logger
public function info(message):Void
Logs the passed-in message object at info level.
The message is only logged when the level is set to INFO or
a level above.
message | the message object to log |
info() in org.as2lib.env.log.Logger
public function warning(message):Void
Logs the passed-in message object at warning level.
The message is only logged when the level is set to WARNING
or a level above.
message | the message object to log |
warning() in org.as2lib.env.log.Logger
public function error(message):Void
Logs the passed-in message object at error level.
The message is only logged when the level is set to ERROR or a
level above.
message | the message object to log |
error() in org.as2lib.env.log.Logger
public function fatal(message):Void
Logs the passed-in message object at fatal level.
The message is only logged when the level is set to FATAL or
a level above.
message | the message object to log |
fatal() in org.as2lib.env.log.Logger