Public Methods
 FunctionDefined By
  
getClassLogger(input:* = null, person:String = null):ILogger
Returns a logger for the passed-in class.
org.as3commons.logging.api
  
getLogger(input:* = null, person:String = null):ILogger
Returns a logger for the passed-in input that can be eighter a String or a Class.
org.as3commons.logging.api
  
getNamedLogger(name:String = null, person:String = null):ILogger
Returns a logger for the passed-in name.
org.as3commons.logging.api


Public Constants
 ConstantDefined By
  LOGGER_FACTORY : LoggerFactory
LOGGER_FACTORY contains the default LoggerFactory used by getLogger and its siblings.
org.as3commons.logging.api
Constant Detail
LOGGER_FACTORYConstant
public const LOGGER_FACTORY:LoggerFactory

Since : 2.0

LOGGER_FACTORY contains the default LoggerFactory used by getLogger and its siblings.

All Logger instances returned by getLogger(), are generated and held by this instance.

        LOGGER_FACTORY.setup = null; // Sets all output to null.
        LOGGER_FACTORY.setup = new SimpleTargetSetup( new SOSTarget );
        // Logs all targets to the SOS Target
     

See also

Function detail
getClassLogger()function
public function getClassLogger(input:* = null, person:String = null):ILogger

Since : 2.0

Returns a logger for the passed-in class.

Shortest access to get a ILogger for a class instance to send your logging statements.

Short form of now deprecated LoggerFactory.getClassLogger(name);.

Parameters

input:* (default = null) — Any object (will be transformed by toLogName).
 
person:String (default = null) — Information about the person that requested this logger.

Returns
ILoggerILogger instance to publish log statements

See also


Example
     package {
        
        import org.as3commons.logging.api.getClassLogger;
        import org.as3commons.logging.api.ILogger;
        
        class MyClass {
            private static const log: ILogger = getClassLogger(MyClass);
            function MyClass() {
                log.info("Hello World");
            }
        }
     } 
     
getLogger()function 
public function getLogger(input:* = null, person:String = null):ILogger

Since : 2.0

Returns a logger for the passed-in input that can be eighter a String or a Class.

Shortest access to get a custom named ILogger instance to send your logging statements.

It chooses depending on the input whether it should act like getNamedLogger(name); or getClassLogger();.

Parameters

input:* (default = null) — If String it will just pass it to getNamedLogger else use it like getClassLogger
 
person:String (default = null) — Information about the person that requested this logger.

Returns
ILoggerILogger instance to publish log statements

See also


Example
     package {
        
        import org.as3commons.logging.api.getLogger;
        import org.as3commons.logging.api.ILogger;
        
        class MyClass {
            private static const log: ILogger = getLogger("This is my super name for this logger");
            function MyClass() {
                log.info("Hello World");
            }
        }
     } 
     
getNamedLogger()function 
public function getNamedLogger(name:String = null, person:String = null):ILogger

Since : 2.0

Returns a logger for the passed-in name.

Shortest access to get a custom named ILogger instance to send your logging statements.

Short form of now deprecated LoggerFactory.getNamedLogger(name);.

Parameters

name:String (default = null) — Any object (will be transformed by toLogName)
 
person:String (default = null) — Information about the person that requested this logger.

Returns
ILoggerILogger instance to publish log statements

See also


Example
     package {
        
        import org.as3commons.logging.api.getNamedLogger;
        import org.as3commons.logging.api.ILogger;
        
        class MyClass {
            private static const log: ILogger = getNamedLogger("This is my super name for this logger");
            function MyClass() {
                log.info("Hello World");
            }
        }
     }