Packagecom.asfusion.mate.utils.debug
Classpublic class Debugger
Implementsmx.logging.ILoggingTarget

The Debugger tag allows debugging your Mate code (EventHandlers and inner-acction-lists, IAction, etc). When using this tag, you specify a level of debugging, which will filter the type of messages you see.

It is recommended that you remove this tag from your code when you are ready to deploy. Its use during production will impact performance if you enabled the debugging in many objects (ie: in many EventHandlers) or if you specified a low debugging level such as ALL or DEBUG.


Example
  <mate:Debugger level="{Debugger.ALL}" />
  



Public Properties
 PropertyDefined by
  filters : Array
In addition to the level setting, filters are used to provide a psuedo-hierarchical mapping for processing only those events for a given category.
Debugger
  level : int
Provides access to the level this target is currently set at.
Debugger
Protected Properties
 PropertyDefined by
  helper : IDebuggerHelper
A helper object that will return messages with debug information.
Debugger
Public Methods
 MethodDefined by
  
Constructor
Debugger
  
addLogger(logger:ILogger):void
Sets up this target with the specified logger.
Debugger
  
removeLogger(logger:ILogger):void
Stops this target from receiving events from the specified logger.
Debugger
Protected Methods
 MethodDefined by
  
applyFilter(category:String):Boolean
This method filters by category
Debugger
  
logEvent(event:LogEvent):void
This method handles a LogEvent from an associated logger.
Debugger
  
logHandler(event:LogEvent):void
Debugger
Public Constants
 ConstantDefined by
  ALL : int = 0
[static] Tells a target to process all messages.
Debugger
  DEBUG : int = 2
[static] Designates informational level messages that are fine grained and most helpful when debugging an application.
Debugger
  ERROR : int = 8
[static] Designates error events that might still allow the application to continue running.
Debugger
  FATAL : int = 1000
[static] Designates events that are very harmful and will eventually lead to application failure.
Debugger
  INFO : int = 4
[static] Designates informational messages that highlight the progress of the application at coarse-grained level.
Debugger
  WARN : int = 6
[static] Designates events that could be harmful to the application operation.
Debugger
Property detail
filtersproperty
filters:Array  [read-write]

In addition to the level setting, filters are used to provide a psuedo-hierarchical mapping for processing only those events for a given category.

Each logger belongs to a category. By convention these categories map to the fully-qualified class name in which the logger is used. For example, a logger that is logging messages for the mx.rpc.soap.WebService class, uses "mx.rpc.soap.WebService" as the parameter to the Log.getLogger() method call. When messages are sent under this category only those targets that have a filter which matches that category receive notification of those events. Filter expressions can include a wildcard match, indicated with an asterisk. The wildcard must be the right-most character in the expression. For example: rpc*, mx.*, or *. If an invalid expression is specified, a InvalidFilterError is thrown. If null or [] is specified, the filters are set to the default of ["*"].

Implementation
    public function get filters():Array
    public function set filters(value:Array):void

Example
                var traceLogger:ILoggingTarget = new TraceTarget();
                traceLogger.filters = ["mx.rpc.*", "mx.messaging.*"];
                Log.addTarget(traceLogger);
          

helperproperty 
protected var helper:IDebuggerHelper

A helper object that will return messages with debug information.

levelproperty 
level:int  [read-write]

Provides access to the level this target is currently set at. Value values are:

Implementation
    public function get level():int
    public function set level(value:int):void
Constructor detail
Debugger()constructor
public function Debugger()

Constructor

Method detail
addLogger()method
public function addLogger(logger:ILogger):void

Sets up this target with the specified logger. This allows this target to receive log events from the specified logger.

Parameters
logger:ILogger — The ILogger that this target should listen to.
applyFilter()method 
protected function applyFilter(category:String):Boolean

This method filters by category

Parameters
category:String

Returns
Boolean
logEvent()method 
protected 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 is called only if the event's level is in range of the target's level.

Parameters
event:LogEvent
logHandler()method 
protected function logHandler(event:LogEvent):void

Parameters
event:LogEvent
removeLogger()method 
public function removeLogger(logger:ILogger):void

Stops this target from receiving events from the specified logger.

Parameters
logger:ILogger — The ILogger that this target should ignore.
Constant detail
ALLconstant
public static const ALL:int = 0

Tells a target to process all messages.

DEBUGconstant 
public static const DEBUG:int = 2

Designates informational level messages that are fine grained and most helpful when debugging an application.

ERRORconstant 
public static const ERROR:int = 8

Designates error events that might still allow the application to continue running.

FATALconstant 
public static const FATAL:int = 1000

Designates events that are very harmful and will eventually lead to application failure.

INFOconstant 
public static const INFO:int = 4

Designates informational messages that highlight the progress of the application at coarse-grained level.

WARNconstant 
public static const WARN:int = 6

Designates events that could be harmful to the application operation.