Packageorg.as3commons.logging.setup.target
Classpublic final class MergedTarget
InheritanceMergedTarget Inheritance Object
Implements ILogTarget

Since : 2

MergedTarget routes a log statement to two ILogTargets.

The logging process assumes that just one logging target will receive log statements. To have two targets to receive the log statements you can use this class.

        LOGGER_FACTORY.setup = new SimpleTargetSetup( new MergedTarget( TRACE_TARGET, new SOSTarget ) );
        // Will output the content to trace and to SOS
     

See also

org.as3commons.logging.setup.target.mergeTargets()


Public Methods
 MethodDefined By
  
MergedTarget(logTargetA:ILogTarget, logTargetB:ILogTarget)
Constructs a new MergedTarget out of two ILogTargets.
MergedTarget
  
insertTargets(array:Array, pos:int):void
Inserts all targets of this MergedTarget into a position of an array (performance ey
MergedTarget
  
log(name:String, shortName:String, level:int, timeStamp:Number, message:*, parameters:Array, person:String):void
Renders a log statement.
MergedTarget
Constructor Detail
MergedTarget()Constructor
public function MergedTarget(logTargetA:ILogTarget, logTargetB:ILogTarget)

Constructs a new MergedTarget out of two ILogTargets.

Parameters
logTargetA:ILogTarget — First ILogTarget to log to.
 
logTargetB:ILogTarget — Second ILogTarget to log to.

Throws
Error — if one of both targets in null
Method Detail
insertTargets()method
public function insertTargets(array:Array, pos:int):void

Inserts all targets of this MergedTarget into a position of an array (performance ey

Parameters

array:Array
 
pos:int

log()method 
public function log(name:String, shortName:String, level:int, timeStamp:Number, message:*, parameters:Array, person:String):void

Renders a log statement.

In version 2.5 the person information was added and the time stamp was modified to represent the local time rather than the time in gmt. Add START_TIME to get the time in ms since 1970.

Parameters

name:String — Name of the logger that triggered the log statement.
 
shortName:String — Shortened form of the name.
 
level:int — Level of the log statement that got triggered.
 
timeStamp:Number — getTimer() Timestame of when the log statement was triggered.
 
message:* — Message of the log statement.
 
parameters:Array — Parameters for the log statement.
 
person:String — Information about the person that filed this log statement.