Console

From Web Computing Documentation
Jump to: navigation, search

class Console

  • henkolib
    • henkolib.log
      • henkolib.log.Console

Class overview

The Console class serves mostly debugging purposes handling log messages. It has the capability to export its content into HTML and text formats for easy displaying. You cannot use this class to interact with the framework through a console interface.

Public variables

static var main : Console

Holds a reference for a static Console object of L4_Information level.

Public functions

new (max : Int = 0, filterlevel : LogLevel, ?parent : Console)

max Number of maximum entries preserved.
filterLevel The maximum level of messages to display.
parent optional The parent object of the Console

getEntries (max : Int = 0, filter : LogLevel) : Iterator<Null<LogEntry>>

max Maximum number of entries to return.
filterLevel The maximum level of entries to return.

Returns the specified number of entries of given levels.

log (level : LogLevel, message : String, ?data : Dynamic, ?source : LogSource, ?pos : PosInfos)

level The level of the logmessage.
message The content of the message
data optional Data to attach to the messsage.
source optional The source of the logmessage.
pos optional The origin of the message located in the source.

setParent (console : Console)

console Parent console.

Sets parent console.

logDebug (message : String, ?data : Dynamic, ?source : LogSource, ?pos : PosInfos)

message The content of the message
data optional Data to attach to the messsage.
source optional The source of the logmessage.
pos optional The origin of the message located in the source.

Logs a message at L5_Debug level.

logInformation (message : String, ?data : Dynamic, ?source : LogSource, ?pos : PosInfos)

message The content of the message
data optional Data to attach to the messsage.
source optional The source of the logmessage.
pos optional The origin of the message located in the source.

Logs a message at L4_Information level.

logNotice (message : String, ?data : Dynamic, ?source : LogSource, ?pos : PosInfos)

message The content of the message
data optional Data to attach to the messsage.
source optional The source of the logmessage.
pos optional The origin of the message located in the source.

Logs a message at L3_Notice level.

logWarning (message : String, ?data : Dynamic, ?source : LogSource, ?pos : PosInfos)

message The content of the message
data optional Data to attach to the messsage.
source optional The source of the logmessage.
pos optional The origin of the message located in the source.

Logs a message at L2_Warning level.

logError (message : String, ?data : Dynamic, ?source : LogSource, ?pos : PosInfos)

message The content of the message
data optional Data to attach to the messsage.
source optional The source of the logmessage.
pos optional The origin of the message located in the source.

Logs a message at L1_Error level.

exportAsHtml (numlast : Int, filter : LogLevel) : String

numlast Maximum number of entries to return.
filterLevel The maximum level of entries to return.

Returns the LogEntries in a formatted HTML string for easy displaying.

exportAsText (numlast : Int, filter : LogLevel) : String

numlast Maximum number of entries to return.
filterLevel The maximum level of entries to return.

Returns the LogEntries in a text string for easy displaying.

copyFrom (console : Console)

console Another Console object.

Copies the contents of another Console object.

hxSerialize (s : haxe.Serializer)

s A Serializer object in which the object's content will be serialized.

Passes the object for serialization to the Serializer object.

unSerialize (s : haxe.Unserializer)

s An Unserializer from which the object can be retrieved.

Retrieves the object from the Unserializer.

Personal tools
Modules