Packageorg.as3commons.logging.setup.target
Classpublic final class AirFileTarget
InheritanceAirFileTarget Inheritance flash.events.EventDispatcher
Implements ILogTarget

Since : 2.0

AirFileTarget logs statements to a log file on the hard disk.

For air application files you might want to store your log on the local File system. It is stored in a extended log format which should be possible to be read with common log file parsers.

Per application startup and at the turn of every day it will change to a new file named with the date of that day and containing the application startup number if started more than once. The file will be named using the SWF_URL.

LOGGER_FACTORY.setup = new SimpleTargetSetup( new AirFileTarget );

See also

org.as3commons.logging.util.SWFInfo.init()
http://www.w3.org/TR/WD-logfile.html


Public Methods
 MethodDefined By
  
AirFileTarget(filePattern:String = null)
Since the output of the files is merely
AirFileTarget
  
dispose(event:Event = null):void
Closes the file and streams open.
AirFileTarget
  
log(name:String, shortName:String, level:int, timeStamp:Number, message:*, params:Array, person:String):void
Renders a log statement.
AirFileTarget
Public Constants
 ConstantDefined By
  DEFAULT_FILE_PATTERN : String
[static] Default file pattern to be used for new files.
AirFileTarget
Constructor Detail
AirFileTarget()Constructor
public function AirFileTarget(filePattern:String = null)

Since the output of the files is merely

Parameters
filePattern:String (default = null) — Pattern to be used to generate the output files.
Method Detail
dispose()method
public function dispose(event:Event = null):void

Closes the file and streams open.

Parameters

event:Event (default = null) — parameter to make it possible to add this method as event listener

log()method 
public function log(name:String, shortName:String, level:int, timeStamp:Number, message:*, params:Array, person:String):void

Renders a log statement.

In version 2.5 the person information was added and the time stamp was modified to represent the local time rather than the time in gmt. Add START_TIME to get the time in ms since 1970.

Parameters

name:String — Name of the logger that triggered the log statement.
 
shortName:String — Shortened form of the name.
 
level:int — Level of the log statement that got triggered.
 
timeStamp:Number — getTimer() Timestame of when the log statement was triggered.
 
message:* — Message of the log statement.
 
params:Array — Parameters for the log statement.
 
person:String — Information about the person that filed this log statement.

Constant Detail
DEFAULT_FILE_PATTERNConstant
public static const DEFAULT_FILE_PATTERN:String

Default file pattern to be used for new files.