Packagecom.daveoncode.logging
Classpublic class LogRecord

Represents a line of text that will be written in the log file



Public Properties
 PropertyDefined by
  category : String
Log's category (qualified class name which has logged the message)
LogRecord
  columns : Array
[static][read-only] Array of LogRecord columns labels
LogRecord
  date : String
Log's date
LogRecord
  level : String
Severity level
LogRecord
  message : String
Log's text message
LogRecord
  time : String
Log's time (hh:mm:ss)
LogRecord
Public Methods
 MethodDefined by
  
LogRecord(level:String = "", date:String = "", time:String = "", category:String = "", message:String = "")
Constructor function of LogRecord class.
LogRecord
  
getDataGridColumns(headers:Vector = null):Array
[static] Returns an array of DataGridColumn objects that will be used by a DataGrid
LogRecord
  
toString():String
Converts LogRecord to a String by joining all the porperties with LogRecord.SEPARATOR constant
LogRecord
Public Constants
 ConstantDefined by
  CATEGORY_COLUMN : String = "category"
[static] A constant which defines the value of the CATEGORY option
LogRecord
  DATE_COLUMN : String = "date"
[static] A constant which defines the value of the DATE option
LogRecord
  LEVEL_COLUMN : String = "level"
[static] A constant which defines the value of the LEVEL option
LogRecord
  MESSAGE_COLUMN : String = "message"
[static] A constant which defines the value of the MESSAGE option
LogRecord
  SEPARATOR : String = " "
[static] A constant which defines the separator used to divide columns
LogRecord
  TIME_COLUMN : String = "time"
[static] A constant which defines the value of the TIME option
LogRecord
Property detail
categoryproperty
category:String  [read-write]

Log's category (qualified class name which has logged the message)

Implementation
    public function get category():String
    public function set category(value:String):void
columnsproperty 
columns:Array  [read-only]

Array of LogRecord columns labels

Implementation
    public static function get columns():Array
dateproperty 
date:String  [read-write]

Log's date

Implementation
    public function get date():String
    public function set date(value:String):void
levelproperty 
level:String  [read-write]

Severity level

Implementation
    public function get level():String
    public function set level(value:String):void
messageproperty 
message:String  [read-write]

Log's text message

Implementation
    public function get message():String
    public function set message(value:String):void
timeproperty 
time:String  [read-write]

Log's time (hh:mm:ss)

Implementation
    public function get time():String
    public function set time(value:String):void
Constructor detail
LogRecord()constructor
public function LogRecord(level:String = "", date:String = "", time:String = "", category:String = "", message:String = "")

Constructor function of LogRecord class.

Parameters
level:String (default = "")
 
date:String (default = "")
 
time:String (default = "")
 
category:String (default = "")
 
message:String (default = "")
Method detail
getDataGridColumns()method
public static function getDataGridColumns(headers:Vector = null):Array

Returns an array of DataGridColumn objects that will be used by a DataGrid

Parameters
headers:Vector (default = null)A Vector of String representing DataGrid's headers (default to null)

Returns
Array — Array

Throws
Throw if the Vector's length doesn't match with LogRecord's columns length
toString()method 
public function toString():String

Converts LogRecord to a String by joining all the porperties with LogRecord.SEPARATOR constant

Returns
String — String
Constant detail
CATEGORY_COLUMNconstant
public static const CATEGORY_COLUMN:String = "category"

A constant which defines the value of the CATEGORY option

DATE_COLUMNconstant 
public static const DATE_COLUMN:String = "date"

A constant which defines the value of the DATE option

LEVEL_COLUMNconstant 
public static const LEVEL_COLUMN:String = "level"

A constant which defines the value of the LEVEL option

MESSAGE_COLUMNconstant 
public static const MESSAGE_COLUMN:String = "message"

A constant which defines the value of the MESSAGE option

SEPARATORconstant 
public static const SEPARATOR:String = " "

A constant which defines the separator used to divide columns

TIME_COLUMNconstant 
public static const TIME_COLUMN:String = "time"

A constant which defines the value of the TIME option