Logger

Contents

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:14

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

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:17


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

Defined in

common/Logger.ts:23


clear

clear(): void

Returns

void

Implementation of

ILogger.clear

Defined in

common/Logger.ts:36


get

get(): any[]

Returns

any[]

Implementation of

ILogger.get

Defined in

common/Logger.ts:40


info

info(...message): Object

Parameters

Name Type
...message any[]

Returns

Object

Name Type
date Date
message any
type string

Defined in

common/Logger.ts:44


debug

debug(...message): Object

Parameters

Name Type
...message any[]

Returns

Object

Name Type
date Date
message any
type string

Implementation of

ILogger.debug

Defined in

common/Logger.ts:47


warn

warn(...message): Object

Parameters

Name Type
...message any[]

Returns

Object

Name Type
date Date
message any
type string

Implementation of

ILogger.warn

Defined in

common/Logger.ts:51


log

log(...message): Object

Parameters

Name Type
...message any[]

Returns

Object

Name Type
date Date
message any
type string

Implementation of

ILogger.log

Defined in

common/Logger.ts:54


toString

toString(...args): string

Parameters

Name Type
...args any[]

Returns

string

Defined in

common/Logger.ts:57


reportError

reportError(err): void

Parameters

Name Type
err any

Returns

void

Implementation of

ILogger.reportError

Defined in

common/Logger.ts:77


error

error(err): void

Parameters

Name Type
err any

Returns

void

Implementation of

ILogger.error

Defined in

common/Logger.ts:94


save

save(filename): Promise<void>

Parameters

Name Type
filename any

Returns

Promise<void>

Implementation of

ILogger.save

Defined in

common/Logger.ts:97