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