Logger
ZtorLog4fLogger delegates all messages to the Log4f.log method of
the ZTOR Log4f project.
Using this class instead of the Log4f class in your application
directly enables you to switch between almost every available Logging API without
having to change the logging calls in your application but just the configuration
on startup.
Every global configuration must be done via the static methods on the
Log4f class itself.
public function ZtorLog4fLogger(level:Number)
Constructs a new ZtorLog4fLogger instance.
The level is by default set to ALL. All messages regardless of their type are logged then.
level | (optional) the level of this logger |
static public ALL:Numberstatic public DEBUG:Numberstatic public INFO:Numberstatic public WARN:Numberstatic public ERROR:Numberstatic public FATAL:Numberstatic public LOG4F:Numberstatic public NONE:Numberpublic function setLevel(level:Number):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 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.
The message is logged using the Log4f.log method, passing
the debug level number and the message as header.
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.
The message is logged using the Log4f.log method, passing
the info level number and the message as header.
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.
The message is logged using the Log4f.log method, passing
the warn level number and the message as header.
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.
The message is logged using the Log4f.log method, passing
the error level number and the message as header.
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.
The message is logged using the Log4f.log method, passing
the fatal level number and the message as header.
message | the message object to log |
fatal() in org.as2lib.env.log.Logger