Package | org.spicefactory.lib.logging.impl |
Class | public class DefaultLogFactory |
Inheritance | DefaultLogFactory Object |
Implements | SpiceLogFactory |
LogFactory
implementation. Uses the DefaultLogger
class when creating Logger
instances.
Method | Defined By | ||
---|---|---|---|
Creates a new instance. | DefaultLogFactory | ||
addAppender(app:Appender):void
Adds the specified Appender to this LogFactory. | DefaultLogFactory | ||
addLogLevel(name:Object, level:LogLevel):void
Adds the specified level for the given logger name. | DefaultLogFactory | ||
Returns the logger for the specified name. | DefaultLogFactory | ||
refresh():void | DefaultLogFactory | ||
setRootLogLevel(level:LogLevel):void
Sets the root log level for this factory. | DefaultLogFactory |
DefaultLogFactory | () | Constructor |
public function DefaultLogFactory()
Creates a new instance.
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
|
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 |