Packageorg.spicefactory.lib.logging.impl
Classpublic class DefaultLogFactory
InheritanceDefaultLogFactory Inheritance Object
Implements SpiceLogFactory

The default LogFactory implementation. Uses the DefaultLogger class when creating Logger instances.



Public Methods
 MethodDefined By
  
Creates a new instance.
DefaultLogFactory
  
Adds the specified Appender to this LogFactory.
DefaultLogFactory
  
addLogLevel(name:Object, level:LogLevel):void
Adds the specified level for the given logger name.
DefaultLogFactory
  
getLogger(name:Object):Logger
Returns the logger for the specified name.
DefaultLogFactory
  
refresh():void
DefaultLogFactory
  
Sets the root log level for this factory.
DefaultLogFactory
Constructor Detail
DefaultLogFactory()Constructor
public function DefaultLogFactory()

Creates a new instance.

Method Detail
addAppender()method
public function addAppender(app:Appender):void

Adds the specified Appender to this LogFactory. Any Logger instances that have already been created will register with this new Appender without the need to call refresh.

Parameters

app:Appender — the Appender instance to add to this LogFactory

addLogLevel()method 
public function addLogLevel(name:Object, level:LogLevel):void

Adds the specified level for the given logger name. The levels are organized in a hierarchical way, so if you specify a level for a logger name "com.mycompany" it is in effect for all names that start with that substring like "com.mycompany.mypackage.MyClass" except for those that have their own level set explicitly.

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 to set the level for
 
level:LogLevel — the level to set for the specified logger name

getLogger()method 
public 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
refresh()method 
public function refresh():void

setRootLogLevel()method 
public function setRootLogLevel(level:LogLevel):void

Sets the root log level for this factory. The root log level specifies the log level to use for all Logger instances that don't have their own level set explicitly.

Parameters

level:LogLevel