Packagesystem.logging.targets
Classpublic class LineFormattedTarget
InheritanceLineFormattedTarget Inheritance LoggerTarget Inheritance Object
Subclasses ExternalTarget, SocketTarget, TextFieldTarget, TraceTarget

All logger target implementations that have a formatted line style output should extend this class. It provides default behavior for including date, time, channel, and level within the output.



Public Properties
 PropertyDefined By
 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
  includeChannel : Boolean
Indicates if the channel for this target should added to the trace.
LineFormattedTarget
  includeDate : Boolean
Indicates if the date should be added to the trace.
LineFormattedTarget
  includeLevel : Boolean
Indicates if the level for the event should added to the trace.
LineFormattedTarget
  includeLines : Boolean
Indicates if the line for the event should added to the trace.
LineFormattedTarget
  includeMilliseconds : Boolean
Indicates if the milliseconds should be added to the trace.
LineFormattedTarget
  includeTime : Boolean
Indicates if the time should be added to the trace.
LineFormattedTarget
 Inheritedlevel : LoggerLevel
Indicates the level of this target.
LoggerTarget
  separator : String =
The separator string.
LineFormattedTarget
Public Methods
 MethodDefined By
  
Creates a new LineFormattedTarget instance.
LineFormattedTarget
 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
  
internalLog(message:*, level:LoggerLevel):void
Descendants of this class should override this method to direct the specified message to the desired output.
LineFormattedTarget
  
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
  
Resets the internal line number value (set to 1).
LineFormattedTarget
Property Detail
includeChannelproperty
public var includeChannel:Boolean

Indicates if the channel for this target should added to the trace.

includeDateproperty 
public var includeDate:Boolean

Indicates if the date should be added to the trace.

includeLevelproperty 
public var includeLevel:Boolean

Indicates if the level for the event should added to the trace.

includeLinesproperty 
public var includeLines:Boolean

Indicates if the line for the event should added to the trace.

includeMillisecondsproperty 
public var includeMilliseconds:Boolean

Indicates if the milliseconds should be added to the trace. Only relevant when includeTime is true.

includeTimeproperty 
public var includeTime:Boolean

Indicates if the time should be added to the trace.

separatorproperty 
public var separator:String =

The separator string.

Constructor Detail
LineFormattedTarget()Constructor
public function LineFormattedTarget()

Creates a new LineFormattedTarget instance.

Method Detail
formatDate()method
hack function formatDate(d:Date):String

This method format the passed Date in arguments.

Parameters

d:Date

Returns
String
formatLevel()method 
hack function formatLevel(level:String):String

This method format the passed level in arguments.

Parameters

level:String

Returns
String
formatLines()method 
hack function formatLines():String

This method format the current line value.

Returns
String
formatMessage()method 
hack function formatMessage(message:*, level:String, channel:String, date:Date):String

This method format the log message.

Parameters

message:*
 
level:String
 
channel:String
 
date:Date

Returns
String
formatTime()method 
hack function formatTime(d:Date):String

This method format the current Date passed in argument.

Parameters

d:Date

Returns
String
getDigit()method 
hack function getDigit(n:Number):String

Returns the string representation of a number and use digit conversion.

Parameters

n:Number

Returns
String — the string representation of a number and use digit conversion.
internalLog()method 
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, channel, etc. based on property settings, such as includeDate, includeChannel, etc.
 
level:LoggerLevel

logEntry()method 
override public function logEntry(entry:LoggerEntry):void

This method receive a LoggerEntry from an associated logger. A target uses this method to translate the event into the appropriate format for transmission, storage, or display. This method will be called only if the event's level is in range of the target's level. Descendants need to override this method to make it useful.

Parameters

entry:LoggerEntry

resetLineNumber()method 
public function resetLineNumber():void

Resets the internal line number value (set to 1).