Class org.as2lib.env.log.logger.DebugItLogger

org.as2lib.core.BasicClass
   +--org.as2lib.env.log.logger.AbstractLogger
      +--org.as2lib.env.log.logger.DebugItLogger

Implemented Interfaces

Logger

Description

DebugItLogger logs messages using com.interactiveAlchemy.utils.Debug.write of the DebugIt Component from Robert Hoekman to log messages.

Note that this logger uses the LogMessage class to wrap and decorate log messages.

Field Index

Inherited from AbstractLogger

ALL, DEBUG, ERROR, FATAL, INFO, NONE, WARNING

Method Index

new DebugItLogger()

debug(), error(), fatal(), getLevel(), getName(), info(), isDebugEnabled(), isEnabled(), isErrorEnabled(), isFatalEnabled(), isInfoEnabled(), isWarningEnabled(), log(), setLevel(), setName(), warning()

Inherited from BasicClass

toString()

Constructor Detail

DebugItLogger

public function DebugItLogger(name:String)

Constructs a new DebugItLogger instance.

The default log level is ALL. This means all messages regardless of their level are logged.

The name is by default shown in the log message to identify where the message came from.

Parameters

name(optional) the name of this logger

Method Detail

getName

public function getName(Void):String

Returns the name of this logger.

This method returns null if no name has been set via the setName method nor on construction.

Return

the name of this logger

setName

public function setName(name:String):Void

Sets the name of this logger.

The name is by default shown in the log message.

Parameters

namethe new name of this logger

setLevel

public function setLevel(level:LogLevel):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.

Parameters

levelthe new log level

getLevel

public function getLevel(Void):LogLevel

Returns the set level.

Return

the set level

isEnabled

public function isEnabled(level:LogLevel):Boolean

Checks whether this logger is enabled for the passed-in level.

false will be returned if:

  • This logger is not enabled for the passed-in level.
  • The passed-in level is null or undefined.

Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.

Parameters

levelthe level to make the check upon

Return

true if this logger is enabled for the given level else false

isDebugEnabled

public function isDebugEnabled(Void):Boolean

Checks if this logger is enabled for debug level log messages.

Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.

Return

true if debug messages are logged

Specified By

isDebugEnabled() in org.as2lib.env.log.Logger

isInfoEnabled

public function isInfoEnabled(Void):Boolean

Checks if this logger is enabled for info level log messages.

Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.

Return

true if info messages are logged

Specified By

isInfoEnabled() in org.as2lib.env.log.Logger

isWarningEnabled

public function isWarningEnabled(Void):Boolean

Checks if this logger is enabled for warning level log messages.

Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.

Return

true if warning messages are logged

Specified By

isWarningEnabled() in org.as2lib.env.log.Logger

isErrorEnabled

public function isErrorEnabled(Void):Boolean

Checks if this logger is enabled for error level log messages.

Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.

Return

true if error messages are logged

Specified By

isErrorEnabled() in org.as2lib.env.log.Logger

isFatalEnabled

public function isFatalEnabled(Void):Boolean

Checks if this logger is enabled for fatal level log messages.

Using this method as shown in the class documentation may improve performance depending on how long the log message construction takes.

Return

true if fatal messages are logged

Specified By

isFatalEnabled() in org.as2lib.env.log.Logger

log

public function log(message, level:LogLevel):Void

Logs the passed-in message at the given level.

The message is only logged when this logger is enabled for the passed-in level.

Parameters

messagethe message object to log
levelthe specific level at which the message shall be logged

debug

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.

Parameters

messagethe message object to log

Specified By

debug() in org.as2lib.env.log.Logger

info

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.

Parameters

messagethe message object to log

Specified By

info() in org.as2lib.env.log.Logger

warning

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.

Parameters

messagethe message object to log

Specified By

warning() in org.as2lib.env.log.Logger

error

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.

Parameters

messagethe message object to log

Specified By

error() in org.as2lib.env.log.Logger

fatal

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.

Parameters

messagethe message object to log

Specified By

fatal() in org.as2lib.env.log.Logger