|
|
|
|
@@ -32,48 +32,60 @@ export class PinoLoggerService implements LoggerService {
|
|
|
|
|
|
|
|
|
|
trace(msg: string, ...args: unknown[]) {
|
|
|
|
|
if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).trace(args[0] as object, msg, ...args.slice(1));
|
|
|
|
|
} else {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).trace(msg, ...args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
debug(msg: string, ...args: unknown[]) {
|
|
|
|
|
if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).debug(args[0] as object, msg, ...args.slice(1));
|
|
|
|
|
} else {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).debug(msg, ...args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
info(msg: string, ...args: unknown[]) {
|
|
|
|
|
if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).info(args[0] as object, msg, ...args.slice(1));
|
|
|
|
|
} else {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).info(msg, ...args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
warn(msg: string, ...args: unknown[]) {
|
|
|
|
|
if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).warn(args[0] as object, msg, ...args.slice(1));
|
|
|
|
|
} else {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).warn(msg, ...args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
error(msg: string, ...args: unknown[]) {
|
|
|
|
|
if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).error(args[0] as object, msg, ...args.slice(1));
|
|
|
|
|
} else {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).error(msg, ...args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fatal(msg: string, ...args: unknown[]) {
|
|
|
|
|
if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).fatal(args[0] as object, msg, ...args.slice(1));
|
|
|
|
|
} else {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
(this.logger as any).fatal(msg, ...args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|