Paket | mx.logging |
Klass | public class AbstractTarget |
Arv | AbstractTarget Object |
Implementerar | ILoggingTarget, IMXMLObject |
Underklasser | LineFormattedTarget |
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
logEvent()
method is provided.
Egenskap | Definieras med | ||
---|---|---|---|
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
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. | AbstractTarget | ||
id : String [skrivskyddad]
Provides access to the id of this target. | AbstractTarget | ||
level : int
Provides access to the level this target is currently set at. | AbstractTarget |
Metod | Definieras med | ||
---|---|---|---|
Constructor. | AbstractTarget | ||
Sets up this target with the specified logger. | AbstractTarget | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Called after the implementing object has been created
and all properties specified on the tag have been assigned. | AbstractTarget | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
This method handles a LogEvent from an associated logger. | AbstractTarget | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Stops this target from receiving events from the specified logger. | AbstractTarget | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object |
filters | egenskap |
filters:Array
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
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 ["*"].
For example:
var traceLogger:ILoggingTarget = new TraceTarget(); traceLogger.filters = ["mx.rpc.*", "mx.messaging.*"]; Log.addTarget(traceLogger);
Implementering
public function get filters():Array
public function set filters(value:Array):void
id | egenskap |
id:String
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Provides access to the id of this target. The id is assigned at runtime by the mxml compiler if used as an mxml tag, or internally if used within a script block
Implementering
public function get id():String
level | egenskap |
level:int
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Provides access to the level this target is currently set at. Value values are:
LogEventLevel.FATAL (1000)
designates events that are very harmful and will eventually lead to application failureLogEventLevel.ERROR (8)
designates error events that might still allow the application to continue running.LogEventLevel.WARN (6)
designates events that could be harmful to the application operationLogEventLevel.INFO (4)
designates informational messages that highlight the progress of the application at coarse-grained level.LogEventLevel.DEBUG (2)
designates informational level messages that are fine grained and most helpful when debugging an application.LogEventLevel.ALL (0)
intended to force a target to process all messages.
Implementering
public function get level():int
public function set level(value:int):void
AbstractTarget | () | Konstruktor |
public function AbstractTarget()
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Constructor.
addLogger | () | metod |
public function addLogger(logger:ILogger):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Sets up this target with the specified logger. This allows this target to receive log events from the specified logger.
Parametrar
logger:ILogger — The ILogger that this target should listen to.
|
initialized | () | metod |
public function initialized(document:Object, id:String):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Called after the implementing object has been created and all properties specified on the tag have been assigned.
Parametrar
document:Object — MXML document that created this object.
| |
id:String — Used by the document to refer to this object.
If the object is a deep property on the document, id is null.
|
logEvent | () | metod |
public function logEvent(event:LogEvent):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
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.
NOTE: Descendants must override this method to make it useful.
Parametrar
event:LogEvent — An event from an associated logger.
|
removeLogger | () | metod |
Tue Jun 12 2018, 01:40 PM Z