Access keys

AudiofarmLogger

Kind of class: class
Inherits from: BasicClass
Implements:
Author: Simon Wacker
Classpath: org.as2lib.env.log.logger.AudiofarmLogger
File last modified: Saturday, 02 July 2005, 22:47:42
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.

Constructor

AudiofarmLogger

function AudiofarmLogger (
name:String)
Constructs a new AudiofarmLogger instance.

Gets an as2logger Logger instance via the
logging.Logger.getLogger method.

Parameters:
name:
the name of this logger

Class properties

ALL

static ALL:Level = Level.ALL
(read,write)
Indicates that all messages shall be logged. This level is equivalent to the
as2logger ALL level.

DEBUG

static DEBUG:Level = Level.CONFIG
(read,write)
Indicates that all messages at debug and higher levels shall be logged. This
level is equivalent to the as2logger CONFIG level.

ERROR

static ERROR:Level = Level.SEVERE
(read,write)
Indicates that all messages at error and higher levels shall be logged. This
level is equivalent to the as2logger SEVERE level.

FATAL

static FATAL:Level = Level.SEVERE
(read,write)
Indicates that all messages at fatal and higher levels shall be logged. This
level is equivalent to the as2logger SEVERE level.

INFO

static INFO:Level = Level.INFO
(read,write)
Indicates that all messages at info and higher levels shall be logged. This
level is equivalent to the as2logger INFO level.

NONE

static NONE:Level = Level.OFF
(read,write)
Indicates that no messages shall be logged; logging shall be turned off. This
level is equivalent to the as2logger OFF level.

WARNING

static WARNING:Level = Level.WARNING
(read,write)
Indicates that all messages at warning and higher levels shall be logged. This
level is equivalent to the as2logger WARNING level.

Instance methods

addPublisher

function addPublisher (
publisher:IPublisher) : Boolean
Adds a new publisher to this logger.
Parameters:
publisher:
the publisher to add
Returns:
true if the publisher was added successfully else
false

debug

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.

Parameters:
message:
the message object to log

error

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.

Parameters:
message:
the message object to log

fatal

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.

Parameters:
message:
the message object to log

getFilter

function getFilter (
Void) : IFilter
Returns the current filter for this logger.
Returns:
this logger's current filter or undefined

getLevel

function getLevel (
Void) : Level
Returns 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.
Returns:
this logger's level

getName

function getName (
Void) : String
Returns the name of this logger.
Returns:
the name of this logger

getParent

function getParent (
Void) : logging.Logger
Returns 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.

Returns:
the parent of this logger

getPublishers

function getPublishers (
Void) : List
Returns a list with publishers associated with this logger.
Returns:
a list with publishers that are associated with this logger

info

function info (
message) : Void
Logs the message object to wrapped as2logger Logger at info level.
Parameters:
message:
the message object to log

isDebugEnabled

function isDebugEnabled (
Void) : Boolean
Checks if this logger is enabled for debug level log messages.
Returns:
true if debug messages are logged
See also:

isErrorEnabled

function isErrorEnabled (
Void) : Boolean
Checks if this logger is enabled for error level log messages.
Returns:
true if error messages are logged
See also:

isFatalEnabled

function isFatalEnabled (
Void) : Boolean
Checks if this logger is enabled for fatal level log messages.
Returns:
true if fatal messages are logged
See also:

isInfoEnabled

function isInfoEnabled (
Void) : Boolean
Checks if this logger is enabled for info level log messages.
Returns:
true if info messages are logged
See also:

isWarningEnabled

function isWarningEnabled (
Void) : Boolean
Checks if this logger is enabled for warning level log messages.
Returns:
true if warning messages are logged
See also:

removePublisher

function removePublisher (
publisher:IPublisher) : Boolean
Removes the given publisher from this logger.
Parameters:
publisher:
the publisher to remove
Returns:
true if the publisher was removed successfully else
false

setFilter

function setFilter (
filter:IFilter) : Void
Sets a new filter for this logger.
Parameters:
filter:
the new filter to set

setLevel

function setLevel (
level:Level) : Void
Set 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.

Parameters:
level:
the new level

warning

function warning (
message) : Void
Logs the message object to wrapped as2logger Logger at warning level.
Parameters:
message:
the message object to log