| Package | system.logging.targets |
| Class | public class ExternalTarget |
| Inheritance | ExternalTarget LineFormattedTarget LoggerTarget Object |
Example :
package examples
{
import system.logging.Log;
import system.logging.Logger;
import system.logging.LoggerLevel;
import system.logging.targets.ExternalTarget;
import flash.display.Sprite;
public class ExternalTargetExample extends Sprite
{
public function ExternalTargetExample()
{
var target:ExternalTarget = new ExternalTarget() ;
target.includeDate = true ;
target.includeTime = true ;
target.includeLevel = true ;
target.includeChannel = true ;
target.includeLines = true ;
target.filters = [ "examples. ] ;
target.level = LoggerLevel.ALL ;
var logger:Logger = Log.getLogger( "examples.TextFieldTarget" ) ;
logger.log ( "Here is some myDebug info : {0} and {1}", 2.25 , true ) ;
logger.debug ( "Here is some debug message." ) ;
logger.info ( "Here is some info message." ) ;
logger.warn ( "Here is some warn message." ) ;
logger.error ( "Here is some error message." ) ;
logger.fatal ( "Here is some fatal error..." ) ;
target.includeDate = false ;
target.includeTime = false ;
target.includeChannel = false ;
logger.info( "test : [{0}, {1}, {2}]", 2, 4, 6 ) ;
}
}
}
| Property | Defined By | ||
|---|---|---|---|
| available : Boolean [read-only]
Indicates whether this player is in a container that offers an external interface. | ExternalTarget | ||
| externalUrl : String = javascript:{0}('{1}');
The internal javascript pattern use to log with the navigateToURL method. | ExternalTarget | ||
![]() | factory : LoggerFactory
Determinates the LoggerFactory reference of the target, by default the target use the system.logging.Log singleton. | LoggerTarget | |
![]() | filters : Array
Indicates the filters array representation of this target. | LoggerTarget | |
![]() | includeChannel : Boolean
Indicates if the channel 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 | |
![]() | includeLines : Boolean
Indicates if the line for the event should added to the trace. | LineFormattedTarget | |
![]() | includeMilliseconds : Boolean
Indicates if the milliseconds should be added to the trace. | LineFormattedTarget | |
![]() | includeTime : Boolean
Indicates if the time should be added to the trace. | LineFormattedTarget | |
![]() | level : LoggerLevel
Indicates the level of this target. | LoggerTarget | |
![]() | separator : String =
The separator string. | LineFormattedTarget | |
| verbose : Boolean
If the target isn't available this flag indicates if the target try to use a javascript notification with the navigateToURL method. | ExternalTarget | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new ExternalTarget instance. | ExternalTarget | ||
![]() | addFilter(channel:String):Boolean
Insert a channel in the fllters if this channel don't exist. | LoggerTarget | |
![]() |
Sets up this target with the specified logger. | LoggerTarget | |
internalLog(message:*, level:LoggerLevel):void [override]
Descendants of this class should override this method to direct the specified message to the desired output. | ExternalTarget | ||
![]() | logEntry(entry:LoggerEntry):void [override]
This method receive a LoggerEntry from an associated logger. | LineFormattedTarget | |
![]() | receive(... values):void
This method is called when the receiver is connected with a Signal object. | LoggerTarget | |
![]() | removeFilter(channel:String):Boolean
Remove a channel in the fllters if this channel exist. | LoggerTarget | |
![]() | removeLogger(logger:Logger):void
Stops this target from receiving events from the specified logger. | LoggerTarget | |
![]() | resetLineNumber():void
Resets the internal line number value (set to 1). | LineFormattedTarget | |
| Constant | Defined By | ||
|---|---|---|---|
| ALL : String = console.log [static]
Designates the "all" external proxy message. | ExternalTarget | ||
| DEBUG : String = console.debug [static]
Designates the "debug" external proxy message. | ExternalTarget | ||
| ERROR : String = console.error [static]
Designates the "error" external proxy message. | ExternalTarget | ||
| FATAL : String = console.error [static]
Designates the "fatal" external proxy message. | ExternalTarget | ||
| INFO : String = console.info [static]
Designates the "info" external proxy message. | ExternalTarget | ||
| NONE : String = console.log [static]
A special level that can be used to turn off logging (0). | ExternalTarget | ||
| WARN : String = console.warn [static]
Designates events that could be harmful to the application operation (6). | ExternalTarget | ||
| WTF : String = console.warn [static]
What a Terrible Failure: designates an exception that should never happen. | ExternalTarget | ||
| available | property |
available:Boolean [read-only] Indicates whether this player is in a container that offers an external interface.
public function get available():Boolean| externalUrl | property |
public var externalUrl:String = javascript:{0}('{1}');The internal javascript pattern use to log with the navigateToURL method.
| verbose | property |
public var verbose:BooleanIf the target isn't available this flag indicates if the target try to use a javascript notification with the navigateToURL method.
| ExternalTarget | () | Constructor |
public function ExternalTarget()Creates a new ExternalTarget instance.
| internalLog | () | method |
override public function internalLog(message:*, level:LoggerLevel):voidDescendants of this class should override this method to direct the specified message to the desired output.
Parameters
message:* — String containing preprocessed log message which may include time, date, channel, etc.
based on property settings, such as includeDate, includeChannel, etc.
| |
level:LoggerLevel |
| ALL | Constant |
public static const ALL:String = console.logDesignates the "all" external proxy message.
| DEBUG | Constant |
public static const DEBUG:String = console.debugDesignates the "debug" external proxy message.
| ERROR | Constant |
public static const ERROR:String = console.errorDesignates the "error" external proxy message.
| FATAL | Constant |
public static const FATAL:String = console.errorDesignates the "fatal" external proxy message.
| INFO | Constant |
public static const INFO:String = console.infoDesignates the "info" external proxy message.
| NONE | Constant |
public static const NONE:String = console.logA special level that can be used to turn off logging (0).
| WARN | Constant |
public static const WARN:String = console.warnDesignates events that could be harmful to the application operation (6).
| WTF | Constant |
public static const WTF:String = console.warnWhat a Terrible Failure: designates an exception that should never happen. (32).