Packagesystem.logging.targets
Classpublic class SocketTarget
InheritanceSocketTarget Inheritance LineFormattedTarget Inheritance LoggerTarget Inheritance Object
Subclasses SOSTarget

Basic implementation to creates socket targets.



Public Properties
 PropertyDefined By
  connected : Boolean
[read-only] Indicates if the target is connected with Socket server.
SocketTarget
 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
  host : String
The host of the socket connection.
SocketTarget
 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
  port : int
The port of the socket connection.
SocketTarget
 Inheritedseparator : String =
The separator string.
LineFormattedTarget
Public Methods
 MethodDefined By
  
SocketTarget(host:String = localhost, port:int = 0, auto:Boolean = false)
Creates a new SocketTarget instance.
SocketTarget
 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
  
close():void
Closes the target socket connection.
SocketTarget
  
connect():void
Connects the target with the socket server.
SocketTarget
  
flush():void
Flush the target with all caching messages.
SocketTarget
  
internalLog(message:*, level:LoggerLevel):void
[override] Descendants of this class should override this method to direct the specified message to the desired output.
SocketTarget
 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
  
send(message:*):void
Send message or bufferize message if the socket is not connected yet.
SocketTarget
Property Detail
connectedproperty
connected:Boolean  [read-only]

Indicates if the target is connected with Socket server.


Implementation
    public function get connected():Boolean
hostproperty 
host:String

The host of the socket connection.


Implementation
    public function get host():String
    public function set host(value:String):void
portproperty 
port:int

The port of the socket connection.


Implementation
    public function get port():int
    public function set port(value:int):void
Constructor Detail
SocketTarget()Constructor
public function SocketTarget(host:String = localhost, port:int = 0, auto:Boolean = false)

Creates a new SocketTarget instance.

Parameters
host:String (default = localhost) — The host of the socket connection (default "localhost").
 
port:int (default = 0) — The port of the socket connection (default 0).
 
auto:Boolean (default = false) — Indicates if the target is auto connected with the server.
Method Detail
close()method
public function close():void

Closes the target socket connection.

connect()method 
public function connect():void

Connects the target with the socket server.

flush()method 
public function flush():void

Flush the target with all caching messages.

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, category, etc. based on property settings, such as includeDate, includeCategory, etc.
 
level:LoggerLevel — the LogEventLevel of the message.

send()method 
public function send(message:*):void

Send message or bufferize message if the socket is not connected yet.

Parameters

message:*