Guida di riferimento di ActionScript® 3.0 per la piattaforma Adobe® Flash®
Home  |  Nascondi elenco pacchetti e classi |  Pacchetti  |  Classi  |  Novità  |  Indice  |  Appendici  |  Perché in inglese?
Filtri: Recupero dati dal server...
Recupero dati dal server...
mx.logging 

AbstractTarget  - AS3 Flex

Pacchettomx.logging
Classepublic class AbstractTarget
EreditarietàAbstractTarget Inheritance Object
Implementa ILoggingTarget, IMXMLObject
Sottoclassi LineFormattedTarget

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

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.



Proprietà pubbliche
 ProprietàDefinito da
 Inheritedconstructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto.
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
[sola lettura] Provides access to the id of this target.
AbstractTarget
  level : int
Provides access to the level this target is currently set at.
AbstractTarget
Metodi pubblici
 MetodoDefinito da
  
Constructor.
AbstractTarget
  
Sets up this target with the specified logger.
AbstractTarget
 Inherited
Indica se per un oggetto è definita una proprietà specifica.
Object
  
Called after the implementing object has been created and all properties specified on the tag have been assigned.
AbstractTarget
 Inherited
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro.
Object
  
This method handles a LogEvent from an associated logger.
AbstractTarget
 Inherited
Indica se la proprietà specificata esiste ed è enumerabile.
Object
  
Stops this target from receiving events from the specified logger.
AbstractTarget
 Inherited
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche.
Object
 Inherited
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate.
Object
 Inherited
Restituisce la rappresentazione in formato stringa dell'oggetto specificato.
Object
 Inherited
Restituisce il valore di base dell'oggetto specificato.
Object
Descrizione delle proprietà

filters

proprietà
filters:Array

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: 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);
         



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

id

proprietà 
id:String  [sola lettura]

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: 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



Implementazione
    public function get id():String

level

proprietà 
level:int

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: 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 failure
  • LogEventLevel.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 operation
  • LogEventLevel.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.



Implementazione
    public function get level():int
    public function set level(value:int):void
Descrizione della funzione di costruzione

AbstractTarget

()Funzione di costruzione
public function AbstractTarget()

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Constructor.

Descrizione dei metodi

addLogger

()metodo
public function addLogger(logger:ILogger):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: 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.

Parametri

logger:ILogger — The ILogger that this target should listen to.

initialized

()metodo 
public function initialized(document:Object, id:String):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Called after the implementing object has been created and all properties specified on the tag have been assigned.

Parametri

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

()metodo 
public function logEvent(event:LogEvent):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: 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.

Parametri

event:LogEvent — An event from an associated logger.

removeLogger

()metodo 
public function removeLogger(logger:ILogger):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Stops this target from receiving events from the specified logger.

Parametri

logger:ILogger — The ILogger that this target should ignore.





[ X ]Perché in inglese?
Il contenuto della Guida di riferimento di ActionScript 3.0 appare in inglese

Non tutte le parti della Guida di riferimento di ActionScript 3.0 sono tradotte in tutte le lingue. Quando un elemento del linguaggio non è tradotto, viene riportato in inglese. Ad esempio, la classe ga.controls.HelpBox non è tradotta in nessuna lingua. Pertanto, nella versione italiana della guida di riferimento, la descrizione della classe ga.controls.HelpBox è riportata in inglese.