Packagesystem.logging
Classpublic class LoggerFactory
InheritanceLoggerFactory Inheritance Object

This factory provides pseudo-hierarchical logging capabilities with multiple format and output options.

This class in an internal class in the package system.logging you can use the Log singleton to deploy all the loggers in your application.



Public Methods
 MethodDefined By
  
Creates a new LoggerFactory instance.
LoggerFactory
  
addTarget(target:LoggerTarget):void
Allows the specified target to begin receiving notification of log events.
LoggerFactory
  
flush():void
This method removes all of the current loggers from the cache of the factory.
LoggerFactory
  
getLogger(channel:String):Logger
Returns the logger associated with the specified channel.
LoggerFactory
  
hasIllegalCharacters(value:String):Boolean
This method checks the specified string value for illegal characters.
LoggerFactory
  
isAll():Boolean
Indicates whether a 'all' level log event will be processed by a log target.
LoggerFactory
  
isDebug():Boolean
Indicates whether a debug level log event will be processed by a log target.
LoggerFactory
  
isError():Boolean
Indicates whether an error level log event will be processed by a log target.
LoggerFactory
  
isFatal():Boolean
Indicates whether a fatal level log event will be processed by a log target.
LoggerFactory
  
isInfo():Boolean
Indicates whether an info level log event will be processed by a log target.
LoggerFactory
  
isWarn():Boolean
Indicates whether a warn level log event will be processed by a log target.
LoggerFactory
  
isWtf():Boolean
Indicates whether a wtf level log event will be processed by a log target.
LoggerFactory
  
Stops the specified target from receiving notification of log events.
LoggerFactory
Constructor Detail
LoggerFactory()Constructor
public function LoggerFactory()

Creates a new LoggerFactory instance.

Method Detail
addTarget()method
public function addTarget(target:LoggerTarget):void

Allows the specified target to begin receiving notification of log events.

Parameters

target:LoggerTarget — The specific target that should capture log events.


Throws
ArgumentError — If the target is invalid.
flush()method 
public function flush():void

This method removes all of the current loggers from the cache of the factory. Subsquent calls to the getLogger() method return new instances of loggers rather than any previous instances with the same category. This method is intended for use in debugging only.

getLogger()method 
public function getLogger(channel:String):Logger

Returns the logger associated with the specified channel. If the category given doesn't exist a new instance of a logger will be returned and associated with that channel. Channels must be at least one character in length and may not contain any blanks or any of the following characters: []~$^&\/(){}<>+=`!#%?,:;'"@ This method will throw an InvalidChannelError if the category specified is malformed.

Parameters

channel:String — The channel of the logger that should be returned.

Returns
Logger — An instance of a logger object for the specified name. If the name doesn't exist, a new instance with the specified name is returned.
hasIllegalCharacters()method 
public function hasIllegalCharacters(value:String):Boolean

This method checks the specified string value for illegal characters.

Parameters

value:String — The String to check for illegal characters. The following characters are not valid: []~$^&\/(){}<>+=`!#%?,:;'"@

Returns
Booleantrue if there are any illegal characters found, false otherwise.
isAll()method 
public function isAll():Boolean

Indicates whether a 'all' level log event will be processed by a log target.

Returns
Boolean — true if a 'all' level log event will be logged; otherwise false.
isDebug()method 
public function isDebug():Boolean

Indicates whether a debug level log event will be processed by a log target.

Returns
Boolean — true if a debug level log event will be logged; otherwise false.
isError()method 
public function isError():Boolean

Indicates whether an error level log event will be processed by a log target.

Returns
Boolean — true if an error level log event will be logged; otherwise false.
isFatal()method 
public function isFatal():Boolean

Indicates whether a fatal level log event will be processed by a log target.

Returns
Boolean — true if a fatal level log event will be logged; otherwise false.
isInfo()method 
public function isInfo():Boolean

Indicates whether an info level log event will be processed by a log target.

Returns
Boolean — true if an info level log event will be logged; otherwise false.
isWarn()method 
public function isWarn():Boolean

Indicates whether a warn level log event will be processed by a log target.

Returns
Boolean — true if a warn level log event will be logged; otherwise false.
isWtf()method 
public function isWtf():Boolean

Indicates whether a wtf level log event will be processed by a log target.

Returns
Boolean — true if a wtf level log event will be logged; otherwise false.
removeTarget()method 
public function removeTarget(target:LoggerTarget):void

Stops the specified target from receiving notification of log events.

Parameters

target:LoggerTarget — The specific target that should capture log events.


Throws
ArgumentError — If the target is invalid.