Logger
DebugItLogger logs messages using com.interactiveAlchemy.utils.Debug.write
of the DebugIt Component from Robert Hoekman to log messages.
Note that this logger uses the LogMessage class to wrap and decorate log messages.
new DebugItLogger()public function DebugItLogger(name:String)
Constructs a new DebugItLogger instance.
The default log level is ALL. This means all messages regardless of
their level are logged.
The name is by default shown in the log message to identify where
the message came from.
name | (optional) the name of this logger |
public function getName(Void):StringReturns the name of this logger.
This method returns null if no name has been set via the
setName method nor on construction.
the name of this logger
public function setName(name:String):VoidSets the name of this logger.
The name is by default shown in the log message.
name | the new name of this logger |
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 isEnabled(level:LogLevel):Boolean
Checks whether this logger is enabled for the passed-in level.
false will be returned if:
level. level is null or undefined.Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.
level | the level to make the check upon |
true if this logger is enabled for the given level else
false
public function isDebugEnabled(Void):BooleanChecks if this logger is enabled for debug level log messages.
Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.
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 log messages.
Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.
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 log messages.
Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.
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 log messages.
Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.
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 log messages.
Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.
true if fatal messages are logged
isFatalEnabled() in org.as2lib.env.log.Logger
public function log(message, level:LogLevel):Void
Logs the passed-in message at the given level.
The message is only logged when this logger is enabled for the
passed-in level.
message | the message object to log |
level | the specific level at which the message shall be logged
|
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 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 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 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 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