Packagesystem.logging.targets
Classpublic class ExternalTarget
InheritanceExternalTarget Inheritance LineFormattedTarget Inheritance LoggerTarget Inheritance Object

Provides a logger target that uses the FireBug console extension in Firefox to output log messages. You can download the FireBug and test this target : https://addons.mozilla.org/fr/firefox/addon/1843. You must launch this example in FireFox with the FireBug console enabled.

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 ) ;
             }
         }
     }
     



Public Properties
 PropertyDefined 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
 Inheritedfactory : LoggerFactory
Determinates the LoggerFactory reference of the target, by default the target use the system.logging.Log singleton.
LoggerTarget
 Inheritedfilters : Array
Indicates the filters array representation of this target.
LoggerTarget
 InheritedincludeChannel : Boolean
Indicates if the channel for this target should added to the trace.
LineFormattedTarget
 InheritedincludeDate : Boolean
Indicates if the date should be added to the trace.
LineFormattedTarget
 InheritedincludeLevel : Boolean
Indicates if the level for the event should added to the trace.
LineFormattedTarget
 InheritedincludeLines : Boolean
Indicates if the line for the event should added to the trace.
LineFormattedTarget
 InheritedincludeMilliseconds : Boolean
Indicates if the milliseconds should be added to the trace.
LineFormattedTarget
 InheritedincludeTime : Boolean
Indicates if the time should be added to the trace.
LineFormattedTarget
 Inheritedlevel : LoggerLevel
Indicates the level of this target.
LoggerTarget
 Inheritedseparator : 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
Public Methods
 MethodDefined By
  
Creates a new ExternalTarget instance.
ExternalTarget
 Inherited
addFilter(channel:String):Boolean
Insert a channel in the fllters if this channel don't exist.
LoggerTarget
 Inherited
addLogger(logger:Logger):void
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
 Inherited
logEntry(entry:LoggerEntry):void
[override] This method receive a LoggerEntry from an associated logger.
LineFormattedTarget
 Inherited
receive(... values):void
This method is called when the receiver is connected with a Signal object.
LoggerTarget
 Inherited
removeFilter(channel:String):Boolean
Remove a channel in the fllters if this channel exist.
LoggerTarget
 Inherited
removeLogger(logger:Logger):void
Stops this target from receiving events from the specified logger.
LoggerTarget
 Inherited
Resets the internal line number value (set to 1).
LineFormattedTarget
Public Constants
 ConstantDefined 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
Property Detail
availableproperty
available:Boolean  [read-only]

Indicates whether this player is in a container that offers an external interface.


Implementation
    public function get available():Boolean
externalUrlproperty 
public var externalUrl:String = javascript:{0}('{1}');

The internal javascript pattern use to log with the navigateToURL method.

verboseproperty 
public var verbose:Boolean

If the target isn't available this flag indicates if the target try to use a javascript notification with the navigateToURL method.

Constructor Detail
ExternalTarget()Constructor
public function ExternalTarget()

Creates a new ExternalTarget instance.

Method Detail
internalLog()method
override public function internalLog(message:*, level:LoggerLevel):void

Descendants 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

Constant Detail
ALLConstant
public static const ALL:String = console.log

Designates the "all" external proxy message.

DEBUGConstant 
public static const DEBUG:String = console.debug

Designates the "debug" external proxy message.

ERRORConstant 
public static const ERROR:String = console.error

Designates the "error" external proxy message.

FATALConstant 
public static const FATAL:String = console.error

Designates the "fatal" external proxy message.

INFOConstant 
public static const INFO:String = console.info

Designates the "info" external proxy message.

NONEConstant 
public static const NONE:String = console.log

A special level that can be used to turn off logging (0).

WARNConstant 
public static const WARN:String = console.warn

Designates events that could be harmful to the application operation (6).

WTFConstant 
public static const WTF:String = console.warn

What a Terrible Failure: designates an exception that should never happen. (32).