Packageorg.spicefactory.lib.logging.impl
Classpublic class DelegateLogger
ImplementsLogger

Logger implementation that delegates all logging operations to a different Logger instance. Spicelib uses this class internally for Loggers created with LogContext.getLogger so that the Logger implementation that does the actual work can be switched dynamically. Usually this class is not used by application code.



Public Properties
 PropertyDefined by
  delegate : Logger
The Logger instance to use as a delegate.
DelegateLogger
  level : LogLevel
The active level of the logger.
DelegateLogger
  name : String
[read-only] The name of the logger.
DelegateLogger
Public Methods
 MethodDefined by
  
Creates a new instance using the specified Logger as the delegate.
DelegateLogger
  
debug(log:String, error:Error = null):void
Logs a message with the DEBUG log level.
DelegateLogger
  
error(log:String, error:Error = null):void
Logs a message with the ERROR log level.
DelegateLogger
  
fatal(log:String, error:Error = null):void
Logs a message with the FATAL log level.
DelegateLogger
  
info(log:String, error:Error = null):void
Logs a message with the INFO log level.
DelegateLogger
  
isDebugEnabled():Boolean
Checks whether the log level DEBUG is active for this Logger.
DelegateLogger
  
isErrorEnabled():Boolean
Checks whether the log level ERROR is active for this Logger.
DelegateLogger
  
isFatalEnabled():Boolean
Checks whether the log level FATAL is active for this Logger.
DelegateLogger
  
isInfoEnabled():Boolean
Checks whether the log level INFO is active for this Logger.
DelegateLogger
  
isTraceEnabled():Boolean
Checks whether the log level TRACE is active for this Logger.
DelegateLogger
  
isWarnEnabled():Boolean
Checks whether the log level WARN is active for this Logger.
DelegateLogger
  
trace(log:String, error:Error = null):void
Logs a message with the TRACE log level.
DelegateLogger
  
warn(log:String, error:Error = null):void
Logs a message with the WARN log level.
DelegateLogger
Property detail
delegateproperty
delegate:Logger  [read-write]

The Logger instance to use as a delegate.

Implementation
    public function get delegate():Logger
    public function set delegate(value:Logger):void
levelproperty 
level:LogLevel  [read-write]

The active level of the logger. Any log operations with a level lower than the value of this property will be filtered.

Implementation
    public function get level():LogLevel
    public function set level(value:LogLevel):void
nameproperty 
name:String  [read-only]

The name of the logger.

Implementation
    public function get name():String
Constructor detail
DelegateLogger()constructor
public function DelegateLogger(log:Logger)

Creates a new instance using the specified Logger as the delegate.

Parameters
log:Logger — the Logger instance to use as a delegate
Method detail
debug()method
public function debug(log:String, error:Error = null):void

Logs a message with the DEBUG log level.

Parameters
log:String — the log message
 
error:Error (default = null) — an optional Error instance associated with the log message.
error()method 
public function error(log:String, error:Error = null):void

Logs a message with the ERROR log level.

Parameters
log:String — the log message
 
error:Error (default = null) — an optional Error instance associated with the log message.
fatal()method 
public function fatal(log:String, error:Error = null):void

Logs a message with the FATAL log level.

Parameters
log:String — the log message
 
error:Error (default = null) — an optional Error instance associated with the log message.
info()method 
public function info(log:String, error:Error = null):void

Logs a message with the INFO log level.

Parameters
log:String — the log message
 
error:Error (default = null) — an optional Error instance associated with the log message.
isDebugEnabled()method 
public function isDebugEnabled():Boolean

Checks whether the log level DEBUG is active for this Logger.

Returns
Boolean — true if the log level DEBUG is active for this Logger
isErrorEnabled()method 
public function isErrorEnabled():Boolean

Checks whether the log level ERROR is active for this Logger.

Returns
Boolean — true if the log level ERROR is active for this Logger
isFatalEnabled()method 
public function isFatalEnabled():Boolean

Checks whether the log level FATAL is active for this Logger.

Returns
Boolean — true if the log level FATAL is active for this Logger
isInfoEnabled()method 
public function isInfoEnabled():Boolean

Checks whether the log level INFO is active for this Logger.

Returns
Boolean — true if the log level INFO is active for this Logger
isTraceEnabled()method 
public function isTraceEnabled():Boolean

Checks whether the log level TRACE is active for this Logger.

Returns
Boolean — true if the log level TRACE is active for this Logger
isWarnEnabled()method 
public function isWarnEnabled():Boolean

Checks whether the log level WARN is active for this Logger.

Returns
Boolean — true if the log level WARN is active for this Logger
trace()method 
public function trace(log:String, error:Error = null):void

Logs a message with the TRACE log level.

Parameters
log:String — the log message
 
error:Error (default = null) — an optional Error instance associated with the log message.
warn()method 
public function warn(log:String, error:Error = null):void

Logs a message with the WARN log level.

Parameters
log:String — the log message
 
error:Error (default = null) — an optional Error instance associated with the log message.