Logger
AudiofarmLogger acts as a wrapper for a logging.Logger instance
of the Logging Framework for ActionScript 2 (as2logger) from Ralf Siegel.
Configure the as2logger 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.
static public ALL:Level ALL level.
static public DEBUG:Level CONFIG level.
static public INFO:Level INFO level.
static public WARNING:Level WARNING level.
static public ERROR:Level SEVERE level.
static public FATAL:Level SEVERE level.
static public NONE:Level OFF level.
public function getName(Void):StringReturns the name of this logger.
the name of this logger
public function getParent(Void):logging.LoggerReturns the parent for this logger.
This method returns the nearest extant parent in the namespace. Thus if a
logger is called "a.b.c.d", and a logger called "a.b" has been created but no
logger "a.b.c" exists, then a call of getParent on the logger "a.b.c.d"
will return the logger "a.b".
The parent for the anonymous logger is always the root (global) logger.
The result will be undefined if it is called on the root (global) logger
in the namespace.
the parent of this logger
public function getPublishers(Void):ListReturns a list with publishers associated with this logger.
a list with publishers that are associated with this logger
public function addPublisher(publisher:IPublisher):BooleanAdds a new publisher to this logger.
publisher | the publisher to add |
true if the publisher was added successfully else
false
public function removePublisher(publisher:IPublisher):Boolean
Removes the given publisher from this logger.
publisher | the publisher to remove |
true if the publisher was removed successfully else
false
public function getFilter(Void):IFilterReturns the current filter for this logger.
this logger's current filter or undefined
public function setFilter(filter:IFilter):VoidSets a new filter for this logger.
filter | the new filter to set |
public function getLevel(Void):LevelReturns the log level specified for this logger. The result may be undefined, which means that this logger's effective level will be inherited from its parent.
this logger's level
public function setLevel(level:Level):VoidSet the log level specifying which messages at which levels will be logged by this logger.
Message levels lower than this value will be discarded. The level value OFF can be used to turn off logging.
If the new level is undefined, it means that this node should inherit
its level from its nearest ancestor with a specific (non-undefined) level value.
level | the new level |
public function isDebugEnabled(Void):BooleanChecks if this logger is enabled for debug level log 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 log 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 log 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 log 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 log messages.
true if fatal messages are logged
isFatalEnabled() in org.as2lib.env.log.Logger
public function debug(message):Void
Logs the message object to wrapped as2logger Logger at debug level.
The debug level is equivalent to the fine level of as2logger.
message | the message object to log |
debug() in org.as2lib.env.log.Logger
public function info(message):Void
Logs the message object to wrapped as2logger Logger at info level.
message | the message object to log |
info() in org.as2lib.env.log.Logger
public function warning(message):Void
Logs the message object to wrapped as2logger Logger at warning level.
message | the message object to log |
warning() in org.as2lib.env.log.Logger
public function error(message):Void
Logs the message object to wrapped as2logger Logger at error level.
The error level is equivalent to the severe level of as2logger.
message | the message object to log |
error() in org.as2lib.env.log.Logger
public function fatal(message):Void
Logs the message object to wrapped as2logger Logger at fatal level.
The fatal level is equivalent to the severe level of as2logger.
message | the message object to log |
fatal() in org.as2lib.env.log.Logger