Packageorg.spicefactory.lib.logging.impl
Classpublic class DefaultLogger
InheritanceDefaultLogger Inheritance flash.events.EventDispatcher
Implements SpiceLogger

The default Logger implementation that dispatches LogEvents for all logging operations.



Public Properties
 PropertyDefined By
  level : LogLevel
The active level of the logger.
DefaultLogger
  name : String
[read-only] The name of the logger.
DefaultLogger
Public Methods
 MethodDefined By
  
DefaultLogger(name:String, level:LogLevel)
Creates a new instance.
DefaultLogger
  
debug(message:String, ... params):void
Logs a message with the DEBUG log level.
DefaultLogger
  
error(message:String, ... params):void
Logs a message with the ERROR log level.
DefaultLogger
  
fatal(message:String, ... params):void
Logs a message with the FATAL log level.
DefaultLogger
  
info(message:String, ... params):void
Logs a message with the INFO log level.
DefaultLogger
  
isDebugEnabled():Boolean
Checks whether the log level DEBUG is active for this Logger.
DefaultLogger
  
isErrorEnabled():Boolean
Checks whether the log level ERROR is active for this Logger.
DefaultLogger
  
isFatalEnabled():Boolean
Checks whether the log level FATAL is active for this Logger.
DefaultLogger
  
isInfoEnabled():Boolean
Checks whether the log level INFO is active for this Logger.
DefaultLogger
  
isTraceEnabled():Boolean
Checks whether the log level TRACE is active for this Logger.
DefaultLogger
  
isWarnEnabled():Boolean
Checks whether the log level WARN is active for this Logger.
DefaultLogger
  
trace(message:String, ... params):void
Logs a message with the TRACE log level.
DefaultLogger
  
warn(message:String, ... params):void
Logs a message with the WARN log level.
DefaultLogger
Events
 Event Summary Defined By
  Dispatched when any of the logging methods is invoked.DefaultLogger
Property Detail
levelproperty
level:LogLevel

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
DefaultLogger()Constructor
public function DefaultLogger(name:String, level:LogLevel)

Creates a new instance.

Parameters
name:String — the name of this Logger
 
level:LogLevel — the log level of this Logger
Method Detail
debug()method
public function debug(message:String, ... params):void

Logs a message with the DEBUG log level.

Parameters

message:String — the log message
 
... params — an optional Error instance associated with the log message.

error()method 
public function error(message:String, ... params):void

Logs a message with the ERROR log level.

Parameters

message:String — the log message
 
... params — an optional Error instance associated with the log message.

fatal()method 
public function fatal(message:String, ... params):void

Logs a message with the FATAL log level.

Parameters

message:String — the log message
 
... params — an optional Error instance associated with the log message.

info()method 
public function info(message:String, ... params):void

Logs a message with the INFO log level.

Parameters

message:String — the log message
 
... params — 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(message:String, ... params):void

Logs a message with the TRACE log level.

Parameters

message:String — the log message
 
... params — an optional Error instance associated with the log message.

warn()method 
public function warn(message:String, ... params):void

Logs a message with the WARN log level.

Parameters

message:String — the log message
 
... params — an optional Error instance associated with the log message.

Event Detail
log Event
Event Object Type: org.spicefactory.lib.logging.LogEvent
LogEvent.type property = org.spicefactory.lib.logging.LogEvent.LOG

Dispatched when any of the logging methods is invoked.

Constant for the type of event fired when a log method is invoked in a Logger instance.