Optional level: LogLevelProtected _logProtected _logOptional Readonly levelProtected _writeThis method must be called by the subclass to write the log entry. It cannot be automated as the
basic design of the log destination is to allow the subclass' .write method to return different
type of value depending on the implementation.
Optional loggerLevel: LogLevelOptional defaultPayload: IJsonClear the log interceptor
Protected formatOptional _loggerLevel: LogLevelOptional defaultPayload: IJsonSet log interceptor to capture the log written
Optional loggerLevel: LogLevelOptional defaultPayload: IJsonOptional loggerLevel: LogLevelOptional defaultPayload: IJsonStatic useAdd this destination to LoggerFactory. Usage:
Use default or configured setting from logger.json
SimpleJsonDestination.use());Set both level and logger name filter
SimpleJsonDestination.use(LogLevel.INFO, 'my-logger');Set only logger name filter
SimpleJsonDestination.use('my-logger', 'another-logger');Optional level: string | LogLevelRest ...filters: string[]Generated using TypeDoc
A minimalistic text based destination that output using following format:
<timestamp in ISO>|<1st char of severity> <message> [<Error name>:<Error message>] [{"key": "value", ...}]E.g.:
2022-11-02T19:51:55.436Z|I This is a info message2022-11-02T19:51:55.438Z|E Create company failed [BadRequest:Missing vat number] {"name":"ACME Inc"}