| Package | org.as3commons.logging.setup.target |
| Class | public final class MergedTarget |
| Inheritance | MergedTarget 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
| Method | Defined By | ||
|---|---|---|---|
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 | ||
| MergedTarget | () | Constructor |
public function MergedTarget(logTargetA:ILogTarget, logTargetB:ILogTarget)
Constructs a new MergedTarget out of two ILogTargets.
logTargetA:ILogTarget — First ILogTarget to log to.
| |
logTargetB:ILogTarget — Second ILogTarget to log to.
|
Error — if one of both targets in null
|
| insertTargets | () | method |
public function insertTargets(array:Array, pos:int):voidInserts 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):voidRenders 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.
|