org.as2lib.core.BasicClass +--org.as2lib.env.log.logger.ZtorLog4fLogger
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:Number
static public DEBUG:Number
static public INFO:Number
static public WARN:Number
static public ERROR:Number
static public FATAL:Number
static public LOG4F:Number
static public NONE:Number
public function setLevel(level:Number):Void
Sets 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):Boolean
Checks if this logger is enabled for debug level messages.
true
if debug messages are logged
public function isInfoEnabled(Void):Boolean
Checks if this logger is enabled for info level messages.
true
if info messages are logged
public function isWarningEnabled(Void):Boolean
Checks if this logger is enabled for warning level messages.
true
if warning messages are logged
public function isErrorEnabled(Void):Boolean
Checks if this logger is enabled for error level messages.
true
if error messages are logged
public function isFatalEnabled(Void):Boolean
Checks if this logger is enabled for fatal level messages.
true
if fatal messages are 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.
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 |
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 |
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 |
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 |
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 |