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
Name | Type |
---|---|
level? | LogLevel |
logFunction? | (entry : LogEntry ) => void |
Returns
Properties
level
• Readonly
level: LogLevel
Methods
debug
▸ debug(message
, meta?
): void
Parameters
Name | Type |
---|---|
message | string |
meta? | LogMetadata |
Returns
void
Implementation of
error
▸ error(message
, meta?
): void
Parameters
Name | Type |
---|---|
message | string |
meta? | LogMetadata |
Returns
void
Implementation of
info
▸ info(message
, meta?
): void
Parameters
Name | Type |
---|---|
message | string |
meta? | LogMetadata |
Returns
void
Implementation of
log
▸ log(level
, message
, meta?
): void
Parameters
Name | Type |
---|---|
level | LogLevel |
message | string |
meta? | LogMetadata |
Returns
void
Implementation of
trace
▸ trace(message
, meta?
): void
Parameters
Name | Type |
---|---|
message | string |
meta? | LogMetadata |
Returns
void
Implementation of
warn
▸ warn(message
, meta?
): void
Parameters
Name | Type |
---|---|
message | string |
meta? | LogMetadata |
Returns
void