| Package | org.as3commons.logging.setup.target |
| Class | public class ConditionalBuffer |
| Inheritance | ConditionalBuffer Object |
| Implements | IAsyncLogTarget |
| Subclasses | FatalBuffer |
| Since : | 2.5 |
ConditionalBuffer stores statements sent to it until a certain
condition is met. In that case it will forward all stored statements to
the defined target.
As target a ILogTarget or a LoggerFactory
is an option.
This is a abstract class. Use implementations like FatalBuffer.
They override the test method to implement conditions.
See also
| Property | Defined By | ||
|---|---|---|---|
| introspectDepth : uint [write-only]
Asynchronous targets need to introspect variables to store them,
for that the introspection depth defines how deep the variables should
be serialized. | ConditionalBuffer | ||
| logFactory : LoggerFactory [write-only]
LoggerFactory to be called with all the buffered statements, once the
condition has been reached. | ConditionalBuffer | ||
| logTarget : ILogTarget [write-only]
ILogTarget to be called with all the buffered statements, once the
condition has been reached. | ConditionalBuffer | ||
| maxStatements : uint [write-only]
Maximum amount of statements buffered, if the buffer is full,
the old statements will be dropped
| ConditionalBuffer | ||
| target : * [write-only]
Target to be called with all the buffered statements, once the
condition has been reached. | ConditionalBuffer | ||
| Method | Defined By | ||
|---|---|---|---|
ConditionalBuffer(target:*, maxStatements:uint, introspectDepth:uint = 5)
Constructs a new ConditionalBuffer instance. | ConditionalBuffer | ||
log(name:String, shortName:String, level:int, timeStamp:Number, message:*, params:Array, person:String):void
Renders a log statement. | ConditionalBuffer | ||
| Method | Defined By | ||
|---|---|---|---|
test(name:String, shortName:String, level:int, timeStamp:Number, message:*, params:Array, person:String):Boolean
Tests the
| ConditionalBuffer | ||
| introspectDepth | property |
introspectDepth:uint [write-only] Asynchronous targets need to introspect variables to store them, for that the introspection depth defines how deep the variables should be serialized. (default=uint.MAX_VALUE)
public function set introspectDepth(value:uint):void| logFactory | property |
logFactory:LoggerFactory [write-only]
LoggerFactory to be called with all the buffered statements, once the
condition has been reached.
public function set logFactory(value:LoggerFactory):void| logTarget | property |
logTarget:ILogTarget [write-only]
ILogTarget to be called with all the buffered statements, once the
condition has been reached.
public function set logTarget(value:ILogTarget):void| maxStatements | property |
maxStatements:uint [write-only] Maximum amount of statements buffered, if the buffer is full, the old statements will be dropped
public function set maxStatements(value:uint):void| target | property |
target:* [write-only] Target to be called with all the buffered statements, once the condition has been reached.
public function set target(value:any):void| ConditionalBuffer | () | Constructor |
public function ConditionalBuffer(target:*, maxStatements:uint, introspectDepth:uint = 5)
Constructs a new ConditionalBuffer instance.
target:* — Target that should receive the log statements.
| |
maxStatements:uint (default = NaN) — Max amount of statements to be buffered.
| |
introspectDepth:uint (default = 5) |
| log | () | method |
public function log(name:String, shortName:String, level:int, timeStamp:Number, message:*, params: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.
| |
params:Array — Parameters for the log statement.
| |
person:String — Information about the person that filed this log statement.
|
| test | () | method |
protected function test(name:String, shortName:String, level:int, timeStamp:Number, message:*, params:Array, person:String):BooleanTests the
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 — Time stamp of when the log statement got triggered.
| |
message:* — Message of the log statement.
| |
params:Array — Parameters for the log statement.
| |
person:String — Information about the person that filed this log statement.
|
Boolean |