| Package | org.as3commons.logging.setup.target |
| Class | public final class AirFileTarget |
| Inheritance | AirFileTarget 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
| Method | Defined 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 | ||
| Constant | Defined By | ||
|---|---|---|---|
| DEFAULT_FILE_PATTERN : String [static] Default file pattern to be used for new files. | AirFileTarget | ||
| AirFileTarget | () | Constructor |
public function AirFileTarget(filePattern:String = null)Since the output of the files is merely
ParametersfilePattern:String (default = null) — Pattern to be used to generate the output files.
|
| dispose | () | method |
public function dispose(event:Event = null):voidCloses 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):voidRenders 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.
|
| DEFAULT_FILE_PATTERN | Constant |
public static const DEFAULT_FILE_PATTERN:StringDefault file pattern to be used for new files.