org.as2lib.core.BasicClass +--org.as2lib.env.log.logger.AbstractLogger +--org.as2lib.env.log.logger.AscbLogger
Logger
AscbLogger
acts as a wrapper for a ascb.util.logging.Logger
instance of the ASCB Logging API.
Configure the ASCB Logging API as normally and just use this class in your application to log messages. This enables you to switch between almost every available Logging API without having to change the logs in your application but just the underlying configuration on startup.
All functionalities that the ASCB Logging API offers are delegated to it. Other functionalities are performed by this class directly.
The level functionalitiy of loggers is not supported by the ASCB Logging API. This is thus provided by this class and not delegated. The ASCB Logging API provides only level functionalitiy for handlers. If you want only the handler level functionality to be enabled just do not set a level on this logger.
new AscbLogger()
public function getName(Void):String
Returns the name of this logger.
the name of this logger
public function setLevel(newLevel:LogLevel):Void
Sets the new level.
If the passed-in newLevel
is null
or undefined
the
default level ALL
is used instead.
The level determines which messages are logged and which are not.
newLevel | the new level |
public function getLevel(Void):LogLevel
Returns the set or default level.
the set or default level
public function isDebugEnabled(Void):Boolean
Checks if this logger is enabled for debug level log messages.
true
if debug messages are logged
public function isInfoEnabled(Void):Boolean
Checks if this logger is enabled for info level log messages.
true
if info messages are logged
public function isWarningEnabled(Void):Boolean
Checks if this logger is enabled for warning level log messages.
true
if warning messages are logged
public function isErrorEnabled(Void):Boolean
Checks if this logger is enabled for error level log messages.
true
if error messages are logged
public function isFatalEnabled(Void):Boolean
Checks if this logger is enabled for fatal level log messages.
true
if fatal messages are logged
public function debug(message):Void
Logs the message object to ASCB Logger
at debug level.
message | the message object to log |
public function info(message):Void
Logs the message object to ASCB Logger
at info level.
message | the message object to log |
public function warning(message):Void
Logs the message object to ASCB Logger
at warning level.
message | the message object to log |
public function error(message):Void
Logs the message object to ASCB Logger
at severe level.
message | the message object to log |