This commit is contained in:
@@ -25,33 +25,39 @@ export class PinoLoggerService implements LoggerService {
|
||||
}
|
||||
|
||||
trace(msg: string, ...args: any[]) {
|
||||
// @ts-expect-error - pino types can be strict
|
||||
this.logger.trace(msg, ...args);
|
||||
}
|
||||
|
||||
debug(msg: string, ...args: any[]) {
|
||||
// @ts-expect-error - pino types can be strict
|
||||
this.logger.debug(msg, ...args);
|
||||
}
|
||||
|
||||
info(msg: string, ...args: any[]) {
|
||||
// @ts-expect-error - pino types can be strict
|
||||
this.logger.info(msg, ...args);
|
||||
}
|
||||
|
||||
warn(msg: string, ...args: any[]) {
|
||||
// @ts-expect-error - pino types can be strict
|
||||
this.logger.warn(msg, ...args);
|
||||
}
|
||||
|
||||
error(msg: string, ...args: any[]) {
|
||||
// @ts-expect-error - pino types can be strict
|
||||
this.logger.error(msg, ...args);
|
||||
}
|
||||
|
||||
fatal(msg: string, ...args: any[]) {
|
||||
// @ts-expect-error - pino types can be strict
|
||||
this.logger.fatal(msg, ...args);
|
||||
}
|
||||
|
||||
child(bindings: Record<string, any>): LoggerService {
|
||||
const childPino = this.logger.child(bindings);
|
||||
const service = new PinoLoggerService();
|
||||
// @ts-ignore - accessing private member for child creation
|
||||
// @ts-expect-error - accessing private member for child creation
|
||||
service.logger = childPino;
|
||||
return service;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user