@terascope/utils / index / Logger
Class: Logger
Extends
EventEmitter
Constructors
new Logger()
new Logger(
options
):Logger
Parameters
Parameter | Type |
---|---|
options | LoggerOptions |
Returns
Overrides
EventEmitter.constructor
Source
packages/types/dist/src/logger.d.ts:7
Properties
fields
fields:
any
Source
packages/types/dist/src/logger.d.ts:21
src
src:
boolean
Source
packages/types/dist/src/logger.d.ts:22
streams
streams:
undefined
[] |internal
|WritableStream
<any
>
Terafoundation specific
Source
packages/types/dist/src/logger.d.ts:20
Methods
addSerializers()
addSerializers(
serializers
):void
Parameters
Parameter | Type |
---|---|
serializers | Serializers |
Returns
void
Source
packages/types/dist/src/logger.d.ts:9
addStream()
addStream(
stream
):void
Parameters
Parameter | Type |
---|---|
stream | Stream |
Returns
void
Source
packages/types/dist/src/logger.d.ts:8
child()
child(
options
,simple
?):Logger
Parameters
Parameter | Type |
---|---|
options | Record <string , any > |
simple ? | boolean |
Returns
Source
packages/types/dist/src/logger.d.ts:10
debug()
debug()
debug():
boolean
Returns a boolean: is the debug
level enabled?
This is equivalent to log.isDebugEnabled()
or log.isEnabledFor(DEBUG)
in log4j.
Returns
boolean
Source
packages/types/dist/src/logger.d.ts:53
debug(error, params)
debug(
error
, ...params
):void
Special case to log an Error
instance to the record.
This adds an err
field with exception details
(including the stack) and sets msg
to the exception
message or you can specify the msg
.