| Package | org.as3commons.logging.integration |
| Class | public final class FlexLogger |
| Inheritance | FlexLogger mx.logging.AbstractTarget |
| Implements | mx.logging.ILoggingTarget |
| Since : | 2 |
FlexLogger implements Flex's ILoggingTarget
and allows this way to route the events sent to Flex's system straight to
the as3commons system.
If you want to switch from the Flex's logging system to the as3commons
logging system you can either change all references to from Flex to as3commons
or use this FlexLogger in the mx.commons setup.
mx.logging.Log.addTarget( new org.as3commons.logging.FlexLogger() );
mx.logging.Log.getLogger( "MyClass" ).debug( "Hello World" );
// is now routed to
org.as3commons.logging.getLogger( "MyClass" ).debug( "Hello World" );
| Method | Defined By | ||
|---|---|---|---|
FlexLogger(level:int = 2)
Constructs the FlexLogger instance. | FlexLogger | ||
addLogger(logger:ILogger):void [override]
Stores a logger from the mx.commons system. | FlexLogger | ||
logEvent(event:LogEvent):void [override]
Routes the log events to the as3commons equivalent. | FlexLogger | ||
| FlexLogger | () | Constructor |
public function FlexLogger(level:int = 2)
Constructs the FlexLogger instance.
level:int (default = 2) — Level to which the targets should be applied.
|
| addLogger | () | method |
override public function addLogger(logger:ILogger):voidStores a logger from the mx.commons system.
Parameters
logger:ILogger — ILogger to be stored.
|
| logEvent | () | method |
override public function logEvent(event:LogEvent):voidRoutes the log events to the as3commons equivalent.
Parameters
event:LogEvent — Event triggered by the flex event system.
|