mx.logging

# LogLogger - AS3 Flex

Package | mx.logging
Class | public class LogLogger
Inheritance | LogLogger EventDispatcher Object
Implements | ILogger

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The logger that is used within the logging framework. This class dispatches events for each message logged using the `log()` method.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | category : String [read-only] The category this logger send messages for. | LogLogger
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | LogLogger(category:String) Constructor. | LogLogger
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. | EventDispatcher
|  | debug(msg:String, ... rest):void Logs the specified data using the LogEventLevel.DEBUG level. | LogLogger
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | error(msg:String, ... rest):void Logs the specified data using the LogEventLevel.ERROR level. | LogLogger
|  | fatal(msg:String, ... rest):void Logs the specified data using the LogEventLevel.FATAL level. | LogLogger
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | EventDispatcher
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | info(msg:String, ... rest):void Logs the specified data using the LogEvent.INFO level. | LogLogger
|  | 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
|  | log(level:int, msg:String, ... rest):void Logs the specified data at the given level. | LogLogger
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | 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
|  | warn(msg:String, ... rest):void Logs the specified data using the LogEventLevel.WARN level. | LogLogger
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | EventDispatcher

Events
Click for more information on events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | activate | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher

Property Detail

### category

property

`category:String` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The category this logger send messages for.

Implementation
`public function get category():String`
Constructor Detail

### LogLogger

()
Constructor

`public function LogLogger(category:String)`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constructor.

Parameters

| `category:String` — The category for which this log sends messages.

Method Detail

### debug

()
method

`public function debug(msg:String, ... rest):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Logs the specified data using the `LogEventLevel.DEBUG` level. `LogEventLevel.DEBUG` designates informational level messages that are fine grained and most helpful when debugging an application.

The string specified for logging can contain braces with an index indicating which additional parameter should be inserted into the string before it is logged. For example "the first additional parameter was {0} the second was {1}" will be translated into "the first additional parameter was 10 the second was 15" when called with 10 and 15 as parameters.

Parameters

| `msg:String` — The information to log. This string can contain special marker characters of the form {x}, where x is a zero based index that will be replaced with the additional parameters found at that index if specified.
| `... rest` — Additional parameters that can be subsituted in the str parameter at each "{`x`}" location, where `x` is an integer (zero based) index value into the Array of values specified.

### error

()
method

`public function error(msg:String, ... rest):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Logs the specified data using the `LogEventLevel.ERROR` level. `LogEventLevel.ERROR` designates error events that might still allow the application to continue running.

The string specified for logging can contain braces with an index indicating which additional parameter should be inserted into the string before it is logged. For example "the first additional parameter was {0} the second was {1}" will be translated into "the first additional parameter was 10 the second was 15" when called with 10 and 15 as parameters.

Parameters

| `msg:String` — The information to log. This String can contain special marker characters of the form {x}, where x is a zero based index that will be replaced with the additional parameters found at that index if specified.
| `... rest` — Additional parameters that can be subsituted in the str parameter at each "{`x`}" location, where `x` is an integer (zero based) index value into the Array of values specified.

### fatal

()
method

`public function fatal(msg:String, ... rest):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Logs the specified data using the `LogEventLevel.FATAL` level. `LogEventLevel.FATAL` designates events that are very harmful and will eventually lead to application failure

The string specified for logging can contain braces with an index indicating which additional parameter should be inserted into the string before it is logged. For example "the first additional parameter was {0} the second was {1}" will be translated into "the first additional parameter was 10 the second was 15" when called with 10 and 15 as parameters.

Parameters

| `msg:String` — The information to log. This String can contain special marker characters of the form {x}, where x is a zero based index that will be replaced with the additional parameters found at that index if specified.
| `... rest` — Additional parameters that can be subsituted in the str parameter at each "{`x`}" location, where `x` is an integer (zero based) index value into the Array of values specified.

### info

()
method

`public function info(msg:String, ... rest):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Logs the specified data using the `LogEvent.INFO` level. `LogEventLevel.INFO` designates informational messages that highlight the progress of the application at coarse-grained level.

The string specified for logging can contain braces with an index indicating which additional parameter should be inserted into the string before it is logged. For example "the first additional parameter was {0} the second was {1}" will be translated into "the first additional parameter was 10 the second was 15" when called with 10 and 15 as parameters.

Parameters

| `msg:String` — The information to log. This String can contain special marker characters of the form {x}, where x is a zero based index that will be replaced with the additional parameters found at that index if specified.
| `... rest` — Additional parameters that can be subsituted in the str parameter at each "{`x`}" location, where `x` is an integer (zero based) index value into the Array of values specified.

### log

()
method

`public function log(level:int, msg:String, ... rest):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Logs the specified data at the given level.

The String specified for logging can contain braces with an index indicating which additional parameter should be inserted into the String before it is logged. For example "the first additional parameter was {0} the second was {1}" is translated into "the first additional parameter was 10 the second was 15" when called with 10 and 15 as parameters.

Parameters

| `level:int` — The level this information should be logged at. Valid values are:

- `LogEventLevel.FATAL` designates events that are very harmful and will eventually lead to application failure
- `LogEventLevel.ERROR` designates error events that might still allow the application to continue running.
- `LogEventLevel.WARN` designates events that could be harmful to the application operation
- `LogEventLevel.INFO` designates informational messages that highlight the progress of the application at coarse-grained level.
- `LogEventLevel.DEBUG` designates informational level messages that are fine grained and most helpful when debugging an application.

| `msg:String` — The information to log. This String can contain special marker characters of the form {x}, where x is a zero based index that will be replaced with the additional parameters found at that index if specified.
| `... rest` — Additional parameters that can be subsituted in the str parameter at each "{`x`}" location, where `x` is an integer (zero based) index value into the Array of values specified.

### warn

()
method

`public function warn(msg:String, ... rest):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Logs the specified data using the `LogEventLevel.WARN` level. `LogEventLevel.WARN` designates events that could be harmful to the application operation.

The string specified for logging can contain braces with an index indicating which additional parameter should be inserted into the string before it is logged. For example "the first additional parameter was {0} the second was {1}" will be translated into "the first additional parameter was 10 the second was 15" when called with 10 and 15 as parameters.

Parameters

| `msg:String` — The information to log. This String can contain special marker characters of the form {x}, where x is a zero based index that will be replaced with the additional parameters found at that index if specified.
| `... rest` — Aadditional parameters that can be subsituted in the str parameter at each "{`x`}" location, where `x` is an integer (zero based) index value into the Array of values specified.

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