Access keys

AbstractLogLevel

Kind of class: class
Inherits from: BasicClass
Implements:
Known subclasses:
Author: Simon Wacker
Classpath: org.as2lib.env.log.level.AbstractLogLevel
File last modified: Monday, 03 October 2005, 12:30:02
AbstractLogLevel acts as a basic access point for the pre-defined levels
ALL, DEBUG, INFO, WARNING, ERROR,
FATAL and NONE.

Summary

Class properties
Class methods
Instance methods
Instance methods inherited from BasicClass

Class properties

ALL

static ALL:LogLevel = new AbstractLogLevel(60, "ALL")
(read,write)
All log messages get logged.

DEBUG

static DEBUG:LogLevel = new AbstractLogLevel(50, "DEBUG")
(read,write)
All log messages that are at a higher log level than debug get logged.

ERROR

static ERROR:LogLevel = new AbstractLogLevel(20, "ERROR")
(read,write)
All log messages that are at a higher log level than error get logged.

FATAL

static FATAL:LogLevel = new AbstractLogLevel(10, "FATAL")
(read,write)
All log messages that are at a higher log level than fatal get logged.

INFO

static INFO:LogLevel = new AbstractLogLevel(40, "INFO")
(read,write)
All log messages that are at a higher log level than info get logged.

NONE

static NONE:LogLevel = new AbstractLogLevel(0, "NONE")
(read,write)
No log messages get logged.

WARNING

static WARNING:LogLevel = new AbstractLogLevel(30, "WARNING")
(read,write)
All log messages that are at a higher log level than warning get logged.

Class methods

forName

static function forName (
name:String) : LogLevel
Returns the log level for the given name.

If the given name is not registered to any logger, INFO is
returned.

Parameters:
name:
the name of the log level to return
Returns:
the log level for the given name

Instance methods

isGreaterOrEqual

function isGreaterOrEqual (
level:LogLevel) : Boolean
Compares the number representation of this level with the one of the passed-in
level using the is greater or equal operator.

true will be returned if:

  • This level is greater or equal than the passed-in level.
  • The passed-in level is null or undefined.
Parameters:
level:
the level to compare this level with
Returns:
true if this level is greater or equal than the passed-in
level else false

toNumber

function toNumber (
Void) : Number
Returns the number representation of this level.

The return value is never null or undefined.

Returns:
the number representation of this level

toString

function toString (
) : String
Returns the string representation of this level.
Returns:
the string representation of this level