mx.logging.targets

# TraceTarget - AS3 Flex

Package | mx.logging.targets
Class | public class TraceTarget
Inheritance | TraceTarget LineFormattedTarget AbstractTarget Object

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Provides a logger target that uses the global `trace()` method to output log messages.

To view `trace()` method output, you must be running the debugger version of Flash Player or AIR Debug Launcher.

The debugger version of Flash Player and AIR Debug Launcher send output from the `trace()` method to the flashlog.txt file. The default location of this file is the same directory as the mm.cfg file. You can customize the location of this file by using the `TraceOutputFileName` property in the mm.cfg file. You must also set `TraceOutputFileEnable` to 1 in your mm.cfg file.

More examples

Using the logging API

Learn more

About logging
Client-side logging and debugging

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | fieldSeparator : String = " " The separator string to use between fields (the default is " ") | LineFormattedTarget
|  | 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 [read-only] Provides access to the id of this target. | AbstractTarget
|  | includeCategory : Boolean Indicates if the category for this target should added to the trace. | LineFormattedTarget
|  | includeDate : Boolean Indicates if the date should be added to the trace. | LineFormattedTarget
|  | includeLevel : Boolean Indicates if the level for the event should added to the trace. | LineFormattedTarget
|  | includeTime : Boolean Indicates if the time should be added to the trace. | LineFormattedTarget
|  | level : int Provides access to the level this target is currently set at. | AbstractTarget

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | TraceTarget() Constructor. | TraceTarget
|  | addLogger(logger:ILogger):void Sets up this target with the specified logger. | AbstractTarget
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | initialized(document:Object, id:String):void Called after the implementing object has been created and all properties specified on the tag have been assigned. | AbstractTarget
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | logEvent(event:LogEvent):void [override] This method handles a LogEvent from an associated logger. | LineFormattedTarget
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeLogger(logger:ILogger):void Stops this target from receiving events from the specified logger. | AbstractTarget
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Constructor Detail

### TraceTarget

()
Constructor

`public function TraceTarget()`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constructor.

Constructs an instance of a logger target that will send the log data to the global `trace()` method. All output will be directed to flashlog.txt by default.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00