Class org.as2lib.env.log.logger.AscbLogger

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

Implemented Interfaces

Logger

Description

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.

Field Index

Inherited from AbstractLogger

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

Method Index

new AscbLogger()

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

Inherited from BasicClass

toString()

Constructor Detail

AscbLogger

public function AscbLogger(name:String)

Constructs a new AscbLogger instance.

Gets an ASCB Logger instance via the {code ascb.util.logging.Logger.getLogger} method.

Parameters

namethe name of this logger

Method Detail

getName

public function getName(Void):String

Returns the name of this logger.

Return

the name of this logger

setLevel

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.

Parameters

newLevelthe new level

getLevel

public function getLevel(Void):LogLevel

Returns the set or default level.

Return

the set or default level

isDebugEnabled

public function isDebugEnabled(Void):Boolean

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

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.

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.

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.

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.

Return

true if fatal messages are logged

Specified By

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

debug

public function debug(message):Void

Logs the message object to ASCB Logger at debug level.

Parameters

messagethe message object to log

Specified By

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

info

public function info(message):Void

Logs the message object to ASCB Logger at info level.

Parameters

messagethe message object to log

Specified By

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

warning

public function warning(message):Void

Logs the message object to ASCB Logger at warning level.

Parameters

messagethe message object to log

Specified By

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

error

public function error(message):Void

Logs the message object to ASCB Logger at severe level.

Parameters

messagethe message object to log

Specified By

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

fatal

public function fatal(message):Void

Logs the message object to ASCB Logger at all level.

Parameters

messagethe message object to log

Specified By

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