Class: MemoryLogger
Record all messages in memory
Extends
Constructors
new MemoryLogger(output, level, limit, includeAll)
new MemoryLogger(
output
,level
,limit
,includeAll
):MemoryLogger
Parameters
• output: WorkerOutput
• level: WorkerLogLevel
= "DEBUG"
• limit: number
= 2000
• includeAll: boolean
= false
Returns
Overrides
Source
Properties
includeAll
protected
includeAll:boolean
Also store other message than logs if true
Source
level
level:
WorkerLogLevel
Inherited from
Source
limit
protected
limit:number
Max number of messages kept
Source
listener
listener: (
msg
) =>void
Parameters
• msg: WorkerMessage
Returns
void
Inherited from
Source
messages
protected
messages:WorkerMessage
[] =[]
Messages received
Source
output
output:
WorkerOutput
Inherited from
Source
Methods
clear()
clear():
void
Clear all messages
Returns
void
Source
close()
close():
void
Close the listener
Returns
void
Inherited from
Source
getLogs()
getLogs():
WorkerMessage
[]
Get all logs messages
Returns
Source
getMessages()
getMessages():
WorkerMessage
[]
Get all messages recorded
Returns
Source
onMessage()
onMessage(
msg
):void
Process a WorkerOutput message
Parameters
• msg: WorkerMessage
Returns
void
Overrides
Source
setLogLevel()
setLogLevel(
level
):void
Set LogLevel
Parameters
• level: WorkerLogLevel
Returns
void