bpmn-server / Logger
Class: Logger#
A logging tool to take various message for monitoring and debugging
it can also keep the message in memory till saved later through saveToFile msgs can be cleared by the clean method
Implements#
Table of contents#
Constructors#
Properties#
Methods#
Constructors#
constructor#
• new Logger(«destructured»
): Logger
Parameters#
Name | Type | Default value |
---|---|---|
«destructured» |
Object |
undefined |
› toConsole |
boolean |
true |
› toFile |
string |
'' |
› callback |
any |
null |
Returns#
Defined in#
Properties#
debugMsgs#
• debugMsgs: any
[] = []
Defined in#
toConsole#
• toConsole: boolean
= true
Defined in#
toFile#
• toFile: any
= null
Defined in#
callback#
• callback: any
= null
Defined in#
level#
• level: number
= 0
Defined in#
Methods#
setOptions#
▸ setOptions(«destructured»
): void
Parameters#
Name | Type |
---|---|
«destructured» |
Object |
› toConsole |
any |
› toFile |
any |
› callback |
any |
Returns#
void
Implementation of#
Defined in#
msg#
▸ msg(message
, type?
): Object
Parameters#
Name | Type | Default value |
---|---|---|
message |
any |
undefined |
type |
string |
'log' |
Returns#
Object
Name | Type |
---|---|
date |
Date |
message |
any |
type |
string |
level |
number |
Defined in#
clear#
▸ clear(): void
Returns#
void
Implementation of#
Defined in#
get#
▸ get(): any
[]
Returns#
any
[]
Implementation of#
Defined in#
info#
▸ info(...message
): Object
Parameters#
Name | Type |
---|---|
...message |
any [] |
Returns#
Object
Name | Type |
---|---|
date |
Date |
message |
any |
type |
string |
level |
number |
Defined in#
debug#
▸ debug(...message
): Object
Parameters#
Name | Type |
---|---|
...message |
any [] |
Returns#
Object
Name | Type |
---|---|
date |
Date |
message |
any |
type |
string |
level |
number |
Implementation of#
Defined in#
warn#
▸ warn(...message
): Object
Parameters#
Name | Type |
---|---|
...message |
any [] |
Returns#
Object
Name | Type |
---|---|
date |
Date |
message |
any |
type |
string |
level |
number |
Implementation of#
Defined in#
log#
▸ log(...message
): Object
Parameters#
Name | Type |
---|---|
...message |
any [] |
Returns#
Object
Name | Type |
---|---|
date |
Date |
message |
any |
type |
string |
level |
number |
Implementation of#
Defined in#
logS#
▸ logS(...message
): Object
Parameters#
Name | Type |
---|---|
...message |
any [] |
Returns#
Object
Name | Type |
---|---|
date |
Date |
message |
any |
type |
string |
level |
number |
Defined in#
logE#
▸ logE(...message
): Object
Parameters#
Name | Type |
---|---|
...message |
any [] |
Returns#
Object
Name | Type |
---|---|
date |
Date |
message |
any |
type |
string |
level |
number |
Defined in#
toString#
▸ toString(...args
): string
Parameters#
Name | Type |
---|---|
...args |
any [] |
Returns#
string
Defined in#
reportError#
▸ reportError(err
): void
Parameters#
Name | Type |
---|---|
err |
any |
Returns#
void
Implementation of#
Defined in#
error#
▸ error(err
): void
Parameters#
Name | Type |
---|---|
err |
any |
Returns#
void
Implementation of#
Defined in#
save#
▸ save(filename
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
filename |
any |
Returns#
Promise
\<void
>