Packagevegas.logging
Classpublic class AbstractTarget
InheritanceAbstractTarget Inheritance CoreEventDispatcher Inheritance CoreObject
ImplementsITarget
SubclassesLineFormattedTarget

This class provides the basic functionality required by the logging framework for a target implementation. It handles the validation of filter expressions and provides a default level property. No implementation of the logEvent() method is provided.



Public Properties
 PropertyDefined by
 Inheritedchannel : String
Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
  charPlacement : String = "'*' must be the right most character."
[static] The static field used when throws an Error when the character placement failed.
AbstractTarget
  charsInvalid : String = "The following characters are not valid: []~$^&/(){}<>+=_-`!@#%?,:;'\"
[static] The static field used when throws an Error when a character is invalid.
AbstractTarget
  errorFilter : String = "Error for filter ''{0}'"
[static] The static field used when throws an Error when filter failed.
AbstractTarget
  filters : Array
(read-write) Returns the filters array representation of this target.
AbstractTarget
 InheritedisGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
  level : LogEventLevel
(read-write) Returns the level of this target.
AbstractTarget
Public Methods
 MethodDefined by
  
AbstractTarget(bGlobal:Boolean = false, sChannel:String = null)
Creates a new AbstractTarget instance.
AbstractTarget
  
addCategory(category:String):Boolean
Insert a category in the fllters if this category don't exist.
AbstractTarget
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
CoreEventDispatcher
  
addLogger(logger:ILogger):void
Sets up this target with the specified logger.
AbstractTarget
  
addNamespace(nameSpace:String):Boolean
Add a new namespace in the filters array.
AbstractTarget
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 Inherited
Returns the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreObject
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
  
logEvent(event:LogEvent):void
This method handles a LogEvent from an associated logger.
AbstractTarget
 Inherited
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
  
removeCategory(category:String):Boolean
Remove a category in the fllters if this category exist.
AbstractTarget
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
  
removeLogger(logger:ILogger):void
Stops this target from receiving events from the specified logger.
AbstractTarget
  
removeNamespace(nameSpace:String):Boolean
Removes an existing namespace in the filters array.
AbstractTarget
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
 Inherited
setLogger(log:ILogger = null):void
Sets the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
CoreEventDispatcher
 Inherited
toString():String
Returns the string representation of this instance.
CoreObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
 Inherited
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
CoreEventDispatcher
Property detail
charPlacementproperty
public static var charPlacement:String = "'*' must be the right most character."

The static field used when throws an Error when the character placement failed.

charsInvalidproperty 
public static var charsInvalid:String = "The following characters are not valid: []~$^&/(){}<>+=_-`!@#%?,:;'\"

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

errorFilterproperty 
public static var errorFilter:String = "Error for filter ''{0}'"

The static field used when throws an Error when filter failed.

filtersproperty 
filters:Array  [read-write]

(read-write) Returns the filters array representation of this target.

Implementation
    public function get filters():Array
    public function set filters(value:Array):void
levelproperty 
level:LogEventLevel  [read-write]

(read-write) Returns the level of this target.

Implementation
    public function get level():LogEventLevel
    public function set level(value:LogEventLevel):void
Constructor detail
AbstractTarget()constructor
public function AbstractTarget(bGlobal:Boolean = false, sChannel:String = null)

Creates a new AbstractTarget instance.

Parameters
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
 
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
Method detail
addCategory()method
public function addCategory(category:String):Boolean

Insert a category in the fllters if this category don't exist. Returns a boolean if the category is add in the list.

Parameters
category:String

Returns
Boolean
addLogger()method 
public function addLogger(logger:ILogger):void

Sets up this target with the specified logger. Note : this method is called by the framework and should not be called by the developer.

Parameters
logger:ILogger
addNamespace()method 
public function addNamespace(nameSpace:String):Boolean

Add a new namespace in the filters array.

Parameters
nameSpace:String

Returns
Boolean
logEvent()method 
public function logEvent(event:LogEvent):void

This method handles a LogEvent from an associated logger. A target uses this method to translate the event into the appropriate format for transmission, storage, or display. This method will be called only if the event's level is in range of the target's level. Descendants need to override this method to make it useful.

Parameters
event:LogEvent
removeCategory()method 
public function removeCategory(category:String):Boolean

Remove a category in the fllters if this category exist. Returns a boolean if the category is remove.

Parameters
category:String

Returns
Boolean
removeLogger()method 
public function removeLogger(logger:ILogger):void

Stops this target from receiving events from the specified logger.

Parameters
logger:ILogger
removeNamespace()method 
public function removeNamespace(nameSpace:String):Boolean

Removes an existing namespace in the filters array.

Parameters
nameSpace:String

Returns
Boolean