Packageorg.as3commons.logging.setup.target
Classpublic final class SOSTarget
InheritanceSOSTarget Inheritance Object
Implements IFormattingLogTarget

Since : 2.0

SOSTarget logs all statements to the SOS console from powerflasher.

The SOS console from Powerflasher is a fast, lightweight console to render log statements from flash. This logger provides the facility to log to the SOS console.

See also

http://www.sos.powerflasher.com/


Public Properties
 PropertyDefined By
  format : String
[write-only] Defines the format used by the target to transform the log statement to a string.
SOSTarget
Public Methods
 MethodDefined By
  
SOSTarget(format:String = null, gateway:SOSGateway = null)
Constructs a new SOSTarget
SOSTarget
  
log(name:String, shortName:String, level:int, timeStamp:Number, message:*, params:Array, person:String):void
Renders a log statement.
SOSTarget
Public Constants
 ConstantDefined By
  DEFAULT_FORMAT : String = {shortSWF}({time}) {shortName}{atPerson}: {message}
[static] Default format used to format the log statement
SOSTarget
  DEFAULT_GATEWAY : SOSGateway
[static] Contains the standard gateway used if no custom one is required.
SOSTarget
Property Detail
formatproperty
format:String  [write-only]

Defines the format used by the target to transform the log statement to a string.

The format passed in can use any of the the following definitions:

FieldDescription
{date}The date in the format YYYY/MM/DD
{dateUTC}The UTC date in the format YYYY/MM/DD
{gmt}The time offset of the statement to the Greenwich mean time in the format GMT+9999
{logLevel}The level of the log statement (example: DEBUG )
{logTime}The UTC time in the format HH:MM:SS.0MS
{message}The message of the logger
{message_dqt}The message of the logger, double quote escaped.
{name}The name of the logger
{time}The time in the format H:M:S.MS
{timeUTC}The UTC time in the format H:M:S.MS
{shortName}The short name of the logger
{shortSWF}The SWF file name
{swf}The full SWF path
{person}The Person that wrote this statement
{atPerson}The Person that wrote this statement with the 'at' prefix


Implementation
    public function set format(value:String):void
Constructor Detail
SOSTarget()Constructor
public function SOSTarget(format:String = null, gateway:SOSGateway = null)

Constructs a new SOSTarget

Parameters
format:String (default = null) — Format to be used to format the statements.
 
gateway:SOSGateway (default = null) — Gateway to the SOS that runs. Will use the default gateway in case no custom one is provided.
Method Detail
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_FORMATConstant
public static const DEFAULT_FORMAT:String = {shortSWF}({time}) {shortName}{atPerson}: {message}

Default format used to format the log statement

DEFAULT_GATEWAYConstant 
public static const DEFAULT_GATEWAY:SOSGateway

Contains the standard gateway used if no custom one is required.