Skip to main content

Class: Logger

@ima/dev-utils.Logger

Constructors

constructor

new Logger(identifier?, globalLogger?)

Parameters

NameType
identifier?string
globalLogger?Logger

Defined in

logger.ts:42

Properties

#globalLogger

Private Optional #globalLogger: Logger

Defined in

logger.ts:37


#identifier

Private Optional #identifier: string

Defined in

logger.ts:36


#isSilent

Private #isSilent: boolean = false

Defined in

logger.ts:38


innerElapsed

Optional innerElapsed: () => string

Type declaration

▸ (): string

Returns time utility function, which when called returns formatted elapsed time from it's creation.

Returns

string

Callback to return formatted elapsed time.

Defined in

logger.ts:40

Methods

#log

Private #log(prefix, chalkFn, message, «destructured»?): void

Parameters

NameType
prefixstring
chalkFn(input: undefined | null | string | number) => string
messagestring
«destructured»LoggerOptions

Returns

void

Defined in

logger.ts:47


endTracking

endTracking(): void

Returns

void

Defined in

logger.ts:94


error

error(message, options?): void

Parameters

NameType
messagestring | Error
options?LoggerOptions

Returns

void

Defined in

logger.ts:120


info

info(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:112


isSilent

isSilent(): boolean

Returns

boolean

Defined in

logger.ts:164


plugin

plugin(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:148


setSilent

setSilent(isSilent): void

Parameters

NameType
isSilentboolean

Returns

void

Defined in

logger.ts:160


success

success(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:116


sync

sync(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:144


warn

warn(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:140


write

write(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:152


writeElapsed

writeElapsed(elapsed): void

Parameters

NameType
elapsed() => string

Returns

void

Defined in

logger.ts:156