Skip to main content

Class: DefaultLogger

worker.DefaultLogger

Default worker logger - uses a default log function to log messages to console.error. See constructor arguments for customization.

Implements

Constructors

constructor

new DefaultLogger(level?, logFunction?): DefaultLogger

Parameters

NameType
level?LogLevel
logFunction?(entry: LogEntry) => void

Returns

DefaultLogger

Properties

level

Readonly level: LogLevel

Methods

debug

debug(message, meta?): void

Parameters

NameType
messagestring
meta?LogMetadata

Returns

void

Implementation of

Logger.debug


error

error(message, meta?): void

Parameters

NameType
messagestring
meta?LogMetadata

Returns

void

Implementation of

Logger.error


info

info(message, meta?): void

Parameters

NameType
messagestring
meta?LogMetadata

Returns

void

Implementation of

Logger.info


log

log(level, message, meta?): void

Parameters

NameType
levelLogLevel
messagestring
meta?LogMetadata

Returns

void

Implementation of

Logger.log


trace

trace(message, meta?): void

Parameters

NameType
messagestring
meta?LogMetadata

Returns

void

Implementation of

Logger.trace


warn

warn(message, meta?): void

Parameters

NameType
messagestring
meta?LogMetadata

Returns

void

Implementation of

Logger.warn