Packageorg.spicefactory.lib.logging
Classpublic class LogContext

Central entry point to the Logging Framework. The static getLogger method is the default way for obtaining a Logger instance. While the correspondig getLogger method on a LogFactory instance could also be used, using the LogContext is more convenient and the only way to align the Loggers of custom application code with the log output of Spicefactory libraries, since all Spicefactory classes use the LogContext internally to obtain Logger instances.

Per default LogContext uses an instance of DefaultLogFactory internally. But using the static factory property you could switch to a custom LogFactory implementation if necessary. You could even switch at runtime and all existing Logger instances obtained through LogContext will be refreshed with instances from the new factory.



Public Properties
 PropertyDefined by
  factory : LogFactory
[static] The LogFactory for the global LogContext.
LogContext
Public Methods
 MethodDefined by
  
getLogger(name:Object):Logger
[static] Returns the logger for the specified name.
LogContext
Property detail
factoryproperty
factory:LogFactory  [read-write]

The LogFactory for the global LogContext. This is the factory that will be used for all Loggers obtained with LogContext.getLogger. If you later switch to a different LogFactory all Loggers obtained with that method will be refreshed to use Logger instances from the new factory.

Implementation
    public static function get factory():LogFactory
    public function set factory(value:LogFactory):void
Method detail
getLogger()method
public static function getLogger(name:Object):Logger

Returns the logger for the specified name. If the name parameter is a Class instance, the fully qualified class name will be used. Otherwise the toString method will be invoked on the given name instance.

Parameters
name:Object — the name of the logger

Returns
Logger — the logger for the specified name