Job Components: `Index Logger 1`
index.Logger
Hierarchy
EventEmitter
↳
Logger
Table of contents
Constructors
Properties
Methods
- addSerializers
- addStream
- child
- debug
- error
- fatal
- flush
- info
- level
- levels
- reopenFileStreams
- trace
- warn
Constructors
constructor
• new Logger(options
): Logger
Parameters
Name | Type |
---|---|
options | LoggerOptions |
Returns
Overrides
EventEmitter.constructor
Defined in
packages/utils/dist/src/logger-interface.d.ts:7
Properties
fields
• fields: any
Defined in
packages/utils/dist/src/logger-interface.d.ts:21
src
• src: boolean
Defined in
packages/utils/dist/src/logger-interface.d.ts:22
streams
• streams: undefined
[] | internal
| WritableStream
<any
>
Terafoundation specific
Defined in
packages/utils/dist/src/logger-interface.d.ts:20
Methods
addSerializers
▸ addSerializers(serializers
): void
Parameters
Name | Type |
---|---|
serializers | Serializers |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:9
addStream
▸ addStream(stream
): void
Parameters
Name | Type |
---|---|
stream | Stream |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:8
child
▸ child(options
, simple?
): Logger
Parameters
Name | Type |
---|---|
options | Record <string , any > |
simple? | boolean |
Returns
Defined in
packages/utils/dist/src/logger-interface.d.ts:10
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
Defined in
packages/utils/dist/src/logger-interface.d.ts:53
▸ 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
.
Parameters
Name | Type |
---|---|
error | Error |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:60
▸ debug(obj
, ...params
): void
The first field can optionally be a "fields" object, which is merged into the log record.
To pass in an Error and other fields, use the err
field name for the Error instance.
Parameters
Name | Type |
---|---|
obj | Record <string , any > |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:68
▸ debug(format
, ...params
): void
Uses util.format
for msg formatting.
Parameters
Name | Type |
---|---|
format | any |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:72
error
▸ error(): boolean
Returns a boolean: is the error
level enabled?
This is equivalent to log.isErrorEnabled()
or log.isEnabledFor(ERROR)
in log4j.
Returns
boolean
Defined in
packages/utils/dist/src/logger-interface.d.ts:128
▸ error(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
.
Parameters
Name | Type |
---|---|
error | Error |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:135
▸ error(obj
, ...params
): void
The first field can optionally be a "fields" object, which is merged into the log record.
To pass in an Error and other fields, use the err
field name for the Error instance.
Parameters
Name | Type |
---|---|
obj | Record <string , any > |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:143
▸ error(format
, ...params
): void
Uses util.format
for msg formatting.
Parameters
Name | Type |
---|---|
format | any |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:147
fatal
▸ fatal(): boolean
Returns a boolean: is the fatal
level enabled?
This is equivalent to log.isFatalEnabled()
or log.isEnabledFor(FATAL)
in log4j.
Returns
boolean
Defined in
packages/utils/dist/src/logger-interface.d.ts:153
▸ fatal(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
.
Parameters
Name | Type |
---|---|
error | Error |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:160
▸ fatal(obj
, ...params
): void
The first field can optionally be a "fields" object, which is merged into the log record.
To pass in an Error and other fields, use the err
field name for the Error instance.
Parameters
Name | Type |
---|---|
obj | Record <string , any > |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:168
▸ fatal(format
, ...params
): void
Uses util.format
for msg formatting.
Parameters
Name | Type |
---|---|
format | any |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:172
flush
▸ flush(): Promise
<boolean
>
Terafoundation specific, flush the logs
Returns
Promise
<boolean
>
Defined in
packages/utils/dist/src/logger-interface.d.ts:176
info
▸ info(): boolean
Returns a boolean: is the info
level enabled?
This is equivalent to log.isInfoEnabled()
or log.isEnabledFor(INFO)
in log4j.
Returns
boolean
Defined in
packages/utils/dist/src/logger-interface.d.ts:78
▸ info(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
.
Parameters
Name | Type |
---|---|
error | Error |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:85
▸ info(obj
, ...params
): void
The first field can optionally be a "fields" object, which is merged into the log record.
To pass in an Error and other fields, use the err
field name for the Error instance.
Parameters
Name | Type |
---|---|
obj | Record <string , any > |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:93
▸ info(format
, ...params
): void
Uses util.format
for msg formatting.
Parameters
Name | Type |
---|---|
format | any |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:97
level
▸ level(): number
Returns
number
Defined in
packages/utils/dist/src/logger-interface.d.ts:12
▸ level(value
): void
Parameters
Name | Type |
---|---|
value | LogLevel |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:13
levels
▸ levels(): number
[]
Returns
number
[]
Defined in
packages/utils/dist/src/logger-interface.d.ts:14
▸ levels(name
): number
Parameters
Name | Type | |
---|---|---|
name | string \ | number |
Returns
number
Defined in
packages/utils/dist/src/logger-interface.d.ts:15
▸ levels(name
, value
): void
Parameters
Name | Type | |
---|---|---|
name | string \ | number |
value | LogLevel |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:16
reopenFileStreams
▸ reopenFileStreams(): void
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:11
trace
▸ trace(): boolean
Returns a boolean: is the trace
level enabled?
This is equivalent to log.isTraceEnabled()
or log.isEnabledFor(TRACE)
in log4j.
Returns
boolean
Defined in
packages/utils/dist/src/logger-interface.d.ts:28
▸ trace(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
.
Parameters
Name | Type |
---|---|
error | Error |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:35
▸ trace(obj
, ...params
): void
The first field can optionally be a "fields" object, which is merged into the log record.
To pass in an Error and other fields, use the err
field name for the Error instance.
Parameters
Name | Type |
---|---|
obj | Record <string , any > |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:43
▸ trace(format
, ...params
): void
Uses util.format
for msg formatting.
Parameters
Name | Type |
---|---|
format | any |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:47
warn
▸ warn(): boolean
Returns a boolean: is the warn
level enabled?
This is equivalent to log.isWarnEnabled()
or log.isEnabledFor(WARN)
in log4j.
Returns
boolean
Defined in
packages/utils/dist/src/logger-interface.d.ts:103
▸ warn(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
.
Parameters
Name | Type |
---|---|
error | Error |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:110
▸ warn(obj
, ...params
): void
The first field can optionally be a "fields" object, which is merged into the log record.
To pass in an Error and other fields, use the err
field name for the Error instance.
Parameters
Name | Type |
---|---|
obj | Record <string , any > |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:118
▸ warn(format
, ...params
): void
Uses util.format
for msg formatting.
Parameters
Name | Type |
---|---|
format | any |
...params | any [] |
Returns
void
Defined in
packages/utils/dist/src/logger-interface.d.ts:122