Class com.innocuo.log.LaoEvent

Description

Simple class to wrap the components of a log message to be sent to a LaoBuffer.

Field Index

argument, cdate, level, type

Constructor Detail

LaoEvent

function LaoEvent(qargument, qtype:String, qlevel:Number)

the Laologger creates an event instance every time you use the com.innocuo.log.LaoLogger.log method of that class. This object is passed as a parameter of an Event to which the buffer is registrered. If you want/need to send an event directly to a LaoBuffer, you need to use its com.innocuo.log.buffers.LaoBuffer.log method, though you need to wrap the LaoEvent in another object that contains two additional properties (see LaoBuffer for more details).

Example

Though this class isn't use directly, this is an example on how to use it:
To create an event of type ERRORCODE-001, with log level 2, that sends a "hello world" string:
var myEvent:LaoEvent=new LaoEvent("hello world","ERRORCODE-001",2);

Parameters

qargumentis the Object (usually a string) you want to send the buffer to be processed
qtypeis the type of the Event. It's a code reference of the message you are sending
qlevelis the log level of the event (it is useful when you are using a LaoLogger which can filter the log messages according to their log level

Field Detail

argument

public argument [Read Only]
The argument is the main property of the event (it's the whole purpose of sending log messages)

type

public type:String [Read Only]
The type is a reference of the string It could be used to organize your events a bit better (in the LaoBuffer)

level

public level:Number [Read Only]
The log level Usually the log level gets checked in the LaoLogger, which also creates the LaoEvents and sends them to the LaoBuffer. So, the level here is just for information.

cdate

public cdate:Date [Read Only]
Every time you create a LaoEvent, the creation date is stored as a property of the Event