Packagevegas.logging
Classpublic class Log

Provides psuedo-hierarchical logging capabilities with multiple format and output options.



Public Properties
 PropertyDefined by
  DEFAULT_CATEGORY : String = ""
[static] const The default categoty of the ILogger instances returns with the getLogger method.
Log
  ILLEGALCHARACTERS : String = "[]~$^&/\(){}<>+=`!#%?,:;'"@"
[static] const The string representation of all the illegal characters.
Log
  INVALID_CHARS : String = "Categories can not contain any of the following characters : []~$^&/\(){}<>+=`!#%?,:;'"@"
[static] The static field used when throws an Error when a character is invalid.
Log
  INVALID_LENGTH : String = "Categories must be at least one character in length."
[static] The static field used when throws an Error when the length of one character is invalid.
Log
  INVALID_TARGET : String = "Log, Invalid target specified."
[static] The static field used when throws an Error when the specified target is invalid.
Log
Public Methods
 MethodDefined by
  
addTarget(target:ITarget):void
[static] Allows the specified target to begin receiving notification of log events.
Log
  
flush():void
[static] This method removes all of the current loggers from the cache.
Log
  
getLogger(category:String):ILogger
[static] Returns the logger associated with the specified category.
Log
  
hasIllegalCharacters(value:String):Boolean
[static] This method checks the specified string value for illegal characters.
Log
  
isDebug():Boolean
[static] Indicates whether a debug level log event will be processed by a log target.
Log
  
isError():Boolean
[static] Indicates whether an error level log event will be processed by a log target.
Log
  
isFatal():Boolean
[static] Indicates whether a fatal level log event will be processed by a log target.
Log
  
isInfo():Boolean
[static] Indicates whether an info level log event will be processed by a log target.
Log
  
isWarn():Boolean
[static] Indicates whether a warn level log event will be processed by a log target.
Log
  
removeTarget(target:ITarget):void
[static] Stops the specified target from receiving notification of log events.
Log
Property detail
DEFAULT_CATEGORYproperty
public static var DEFAULT_CATEGORY:String = ""

const The default categoty of the ILogger instances returns with the getLogger method.

ILLEGALCHARACTERSproperty 
public static var ILLEGALCHARACTERS:String = "[]~$^&/\(){}<>+=`!#%?,:;'"@"

const The string representation of all the illegal characters.

INVALID_CHARSproperty 
public static var INVALID_CHARS:String = "Categories can not contain any of the following characters : []~$^&/\(){}<>+=`!#%?,:;'"@"

The static field used when throws an Error when a character is invalid.

INVALID_LENGTHproperty 
public static var INVALID_LENGTH:String = "Categories must be at least one character in length."

The static field used when throws an Error when the length of one character is invalid.

INVALID_TARGETproperty 
public static var INVALID_TARGET:String = "Log, Invalid target specified."

The static field used when throws an Error when the specified target is invalid.

Method detail
addTarget()method
public static function addTarget(target:ITarget):void

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

Parameters
target:ITarget — specific target that should capture log events.
flush()method 
public static function flush():void

This method removes all of the current loggers from the cache. 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 static function getLogger(category:String):ILogger

Returns the logger associated with the specified category. If the category given doesn't exist a new instance of a logger will be returned and associated with that category. Categories 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 InvalidCategoryError if the category specified is malformed.

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

Returns
ILogger — 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 static 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
isDebug()method 
public static 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 static 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 static 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 static 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 static 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.
removeTarget()method 
public static function removeTarget(target:ITarget):void

Stops the specified target from receiving notification of log events.

Parameters
target:ITarget — specific target that should capture log events.