Package | com.asfusion.mate.utils.debug |
Class | public class Debugger |
Implements | mx.logging.ILoggingTarget |
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.
<mate:Debugger level="{Debugger.ALL}" />
Property | Defined 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 |
Property | Defined by | ||
---|---|---|---|
helper : IDebuggerHelper
A helper object that will return messages with debug information.
| Debugger |
Method | Defined by | ||
---|---|---|---|
Debugger()
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 |
Method | Defined 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 |
Constant | Defined 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 |
filters | property |
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 ["*"].
public function get filters():Array
public function set filters(value:Array):void
var traceLogger:ILoggingTarget = new TraceTarget(); traceLogger.filters = ["mx.rpc.*", "mx.messaging.*"]; Log.addTarget(traceLogger);
helper | property |
protected var helper:IDebuggerHelper
A helper object that will return messages with debug information.
level | property |
level:int
[read-write]Provides access to the level this target is currently set at. Value values are:
Debugger.FATAL
designates events that are very
harmful and will eventually lead to application failureDebugger.ERROR
designates error events that might
still allow the application to continue running.Debugger.WARN
designates events that could be
harmful to the application operationDebugger.INFO
designates informational messages
that highlight the progress of the application at
coarse-grained level.Debugger.DEBUG
designates informational
level messages that are fine grained and most helpful when
debugging an application.Debugger.ALL
intended to force a target to
process all messages. public function get level():int
public function set level(value:int):void
Debugger | () | constructor |
public function Debugger()
Constructor
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.
Parameterslogger:ILogger — The ILogger that this target should listen to.
|
applyFilter | () | method |
protected function applyFilter(category:String):Boolean
This method filters by category
Parameterscategory:String |
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.
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.
Parameterslogger:ILogger — The ILogger that this target should ignore.
|
ALL | constant |
public static const ALL:int = 0
Tells a target to process all messages.
DEBUG | constant |
public static const DEBUG:int = 2
Designates informational level messages that are fine grained and most helpful when debugging an application.
ERROR | constant |
public static const ERROR:int = 8
Designates error events that might still allow the application to continue running.
FATAL | constant |
public static const FATAL:int = 1000
Designates events that are very harmful and will eventually lead to application failure.
INFO | constant |
public static const INFO:int = 4
Designates informational messages that highlight the progress of the application at coarse-grained level.
WARN | constant |
public static const WARN:int = 6
Designates events that could be harmful to the application operation.