Packagede.flamelab.log
Classpublic class Log
InheritanceLog Inheritance flash.events.EventDispatcher

Basic logging class which manages writers and starts logging action. A log instance can have several writers. If the log() method is called, it passes the event to all regitered writers. It also defines several log states which can be used for filtering. A log instance can be used in two ways.



Public Methods
 MethodDefined by
  
Log()
Empty constructor
Log
  
Add writer to log instance
Log
  
log(msg:Object, prio:int):void
Log a message.
Log
  
Remove writer from log
Log
Public Constants
 ConstantDefined by
  ALERT : int = 1
[static]
Log
  CRIT : int = 2
[static]
Log
  DEBUG : int = 7
[static]
Log
  EMERG : int = 0
[static] Priority of log actions
Log
  ERR : int = 3
[static]
Log
  INFO : int = 6
[static]
Log
  LOGCODES : Array
[static] Reverse mapping of codes to string
Log
  NOTICE : int = 5
[static]
Log
  WARN : int = 4
[static]
Log
Constructor detail
Log()constructor
public function Log()

Empty constructor

Method detail
addWriter()method
public function addWriter(writer:AbstractLogWriter):void

Add writer to log instance

Parameters
writer:AbstractLogWriter — Instance of writer which implements concrete logging action
log()method 
public function log(msg:Object, prio:int):void

Log a message. This method is the main loggin method which shoulf be called.

Parameters
msg:Object — An object containing the log info, e.g. a string with an message, or an array with more concrete log data.
 
prio:int — An integer indicating the log priority
removeWriter()method 
public function removeWriter(writer:AbstractLogWriter):void

Remove writer from log

Parameters
writer:AbstractLogWriter — Instance of writer which implements concrete logging action
Constant detail
ALERTconstant
public static const ALERT:int = 1
CRITconstant 
public static const CRIT:int = 2
DEBUGconstant 
public static const DEBUG:int = 7
EMERGconstant 
public static const EMERG:int = 0

Priority of log actions

ERRconstant 
public static const ERR:int = 3
INFOconstant 
public static const INFO:int = 6
LOGCODESconstant 
public static const LOGCODES:Array

Reverse mapping of codes to string

NOTICEconstant 
public static const NOTICE:int = 5
WARNconstant 
public static const WARN:int = 4