Skip to content

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#

Logger

Defined in#

common/Logger.ts:15

Properties#

debugMsgs#

debugMsgs: any[] = []

Defined in#

common/Logger.ts:9


toConsole#

toConsole: boolean = true

Defined in#

common/Logger.ts:10


toFile#

toFile: any = null

Defined in#

common/Logger.ts:11


callback#

callback: any = null

Defined in#

common/Logger.ts:12


level#

level: number = 0

Defined in#

common/Logger.ts:13

Methods#

setOptions#

setOptions(«destructured»): void

Parameters#

Name Type
«destructured» Object
› toConsole any
› toFile any
› callback any

Returns#

void

Implementation of#

ILogger.setOptions

Defined in#

common/Logger.ts:18


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#

common/Logger.ts:24


clear#

clear(): void

Returns#

void

Implementation of#

ILogger.clear

Defined in#

common/Logger.ts:38


get#

get(): any[]

Returns#

any[]

Implementation of#

ILogger.get

Defined in#

common/Logger.ts:42


info#

info(...message): Object

Parameters#

Name Type
...message any[]

Returns#

Object

Name Type
date Date
message any
type string
level number

Defined in#

common/Logger.ts:46


debug#

debug(...message): Object

Parameters#

Name Type
...message any[]

Returns#

Object

Name Type
date Date
message any
type string
level number

Implementation of#

ILogger.debug

Defined in#

common/Logger.ts:49


warn#

warn(...message): Object

Parameters#

Name Type
...message any[]

Returns#

Object

Name Type
date Date
message any
type string
level number

Implementation of#

ILogger.warn

Defined in#

common/Logger.ts:53


log#

log(...message): Object

Parameters#

Name Type
...message any[]

Returns#

Object

Name Type
date Date
message any
type string
level number

Implementation of#

ILogger.log

Defined in#

common/Logger.ts:56


logS#

logS(...message): Object

Parameters#

Name Type
...message any[]

Returns#

Object

Name Type
date Date
message any
type string
level number

Defined in#

common/Logger.ts:59


logE#

logE(...message): Object

Parameters#

Name Type
...message any[]

Returns#

Object

Name Type
date Date
message any
type string
level number

Defined in#

common/Logger.ts:65


toString#

toString(...args): string

Parameters#

Name Type
...args any[]

Returns#

string

Defined in#

common/Logger.ts:70


reportError#

reportError(err): void

Parameters#

Name Type
err any

Returns#

void

Implementation of#

ILogger.reportError

Defined in#

common/Logger.ts:102


error#

error(err): void

Parameters#

Name Type
err any

Returns#

void

Implementation of#

ILogger.error

Defined in#

common/Logger.ts:119


save#

save(filename): Promise\<void>

Parameters#

Name Type
filename any

Returns#

Promise\<void>

Implementation of#

ILogger.save

Defined in#

common/Logger.ts:122