Skip to content

Class: PinoCompatibleLogger

A logger which implementes the Pino logger interface.

Constructors

Constructor

ts
new PinoCompatibleLogger(level:
  | PinoCompatibleLoggerLevel
  | "DEBUG"
  | "INFO"
  | "ERROR"
  | "TRACE"
  | "WARN"
  | "FATAL", loki?: LokiTransportOptions): PinoCompatibleLogger;

Parameters

ParameterTypeDefault value
level| PinoCompatibleLoggerLevel | "DEBUG" | "INFO" | "ERROR" | "TRACE" | "WARN" | "FATAL"'info'
loki?LokiTransportOptionsundefined

Returns

PinoCompatibleLogger

Accessors

complete

Get Signature

ts
get complete(): Promise<void>;

A promise that resolves when the logger has finished processing all log messages.

Returns

Promise<void>

Methods

child()

ts
child(): PinoCompatibleLogger;

Returns a child logger with the same level.

Returns

PinoCompatibleLogger

The current Pino-compatible logger.]

Deprecated

This method is only implemented for compatibility with Pino.


close()

ts
close(): void;

Close the logger and flush any remaining log messages.

Returns

void


debug()

ts
debug(what: any, ...args: any[]): void;

Log a message at the debug level.

Parameters

ParameterTypeDescription
whatanyWhat to log
...argsany[]Additional arguments to log

Returns

void


error()

ts
error(what: any, ...args: any[]): void;

Log a message at the error level.

Parameters

ParameterTypeDescription
whatanyWhat to log
...argsany[]Additional arguments to log

Returns

void


fatal()

ts
fatal(what: any, ...args: any[]): void;

Log a message at the fatal level.

Parameters

ParameterTypeDescription
whatanyWhat to log
...argsany[]Additional arguments to log

Returns

void


info()

ts
info(what: any, ...args: any[]): void;

Log a message at the info level.

Parameters

ParameterTypeDescription
whatanyWhat to log
...argsany[]Additional arguments to log

Returns

void


shutdown()

ts
shutdown(): Promise<void>;

Shuts down the logger and flushes any remaining log messages.

Returns

Promise<void>


trace()

ts
trace(what: any, ...args: any[]): void;

Log a message at the trace level.

Parameters

ParameterTypeDescription
whatanyWhat to log
...argsany[]Additional arguments to log

Returns

void


warn()

ts
warn(what: any, ...args: any[]): void;

Log a message at the warn level.

Parameters

ParameterTypeDescription
whatanyWhat to log
...argsany[]Additional arguments to log

Returns

void