Packagecom.bourre.utils
Classpublic class SosLayout
ImplementsLogListener

Player version: Flash Player 9.0
Language version: ActionScript 3.0

The SosLayout class provides a convenient way to output messages through SOS Max console.


Example
Add SosLayout as Log listener
  
  //Add console for all channels
  Logger.getInstance().addLogListener( SosLayout.getInstance() );
  
  //Add console for a dedicated channel
  Logger.getInstance().addLogListener( SosLayout.getInstance(), PixlibDebug.CHANNEL );
  

Output message
  
  //Simple ouput
  Logger.DEBUG( "My message" );
  
  //Channel target
  Logger.WARN( "My messsage", PixlibDebug.CHANNEL );
  
  //Channel use
  PixlibDebug.ERROR( "My error" );
  

See also

SOS Max Console
com.bourre.log.Logger
com.bourre.log.LogListener
com.bourre.log.LogLevel


Public Properties
 PropertyDefined by
  IP : String = "localhost"
[static] SOS Console IP Address.
SosLayout
  PORT : Number = 4444
[static] SOS Console connection port.
SosLayout
Public Methods
 MethodDefined by
  
clearOutput():void
Clears console.
SosLayout
  
[static] Returns unique instance.
SosLayout
  
onLog(e:LogEvent):void
Triggered when a log message is sent to the Logger and the SOS Console is registered as Log listener.
SosLayout
  
output(o:Object, level:LogLevel):void
Sends messages to console.
SosLayout
  
toString():String
Returns the string representation of this instance.
SosLayout
Property detail
IPproperty
public static var IP:String = "localhost"

Player version: Flash Player 9.0
Language version: ActionScript 3.0

SOS Console IP Address.

The default value is localhost.

PORTproperty 
public static var PORT:Number = 4444

Player version: Flash Player 9.0
Language version: ActionScript 3.0

SOS Console connection port.

The default value is 4444.

Method detail
clearOutput()method
public function clearOutput():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Clears console.

getInstance()method 
public static function getInstance():SosLayout

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns unique instance.

Returns
SosLayout
onLog()method 
public function onLog(e:LogEvent):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Triggered when a log message is sent to the Logger and the SOS Console is registered as Log listener.

Parameters
e:LogEventLogEvent event containing information about the message to log.
output()method 
public function output(o:Object, level:LogLevel):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Sends messages to console.

It is a direct access to log message into console without use the Logging API.

Parameters
o:Object
 
level:LogLevel
toString()method 
public function toString():String

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the string representation of this instance.

Returns
String — the string representation of this instance