fix: linting
Some checks failed
Build & Deploy / 🔍 Prepare Environment (push) Successful in 5s
Build & Deploy / 🧪 QA (push) Failing after 1m14s
Build & Deploy / 🏗️ Build (push) Failing after 4m44s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🔔 Notifications (push) Successful in 1s
Some checks failed
Build & Deploy / 🔍 Prepare Environment (push) Successful in 5s
Build & Deploy / 🧪 QA (push) Failing after 1m14s
Build & Deploy / 🏗️ Build (push) Failing after 4m44s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🔔 Notifications (push) Successful in 1s
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
export type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
||||
|
||||
export interface LoggerService {
|
||||
trace(msg: string, ...args: any[]): void;
|
||||
debug(msg: string, ...args: any[]): void;
|
||||
info(msg: string, ...args: any[]): void;
|
||||
warn(msg: string, ...args: any[]): void;
|
||||
error(msg: string, ...args: any[]): void;
|
||||
fatal(msg: string, ...args: any[]): void;
|
||||
child(bindings: Record<string, any>): LoggerService;
|
||||
trace(msg: string, ...args: unknown[]): void;
|
||||
debug(msg: string, ...args: unknown[]): void;
|
||||
info(msg: string, ...args: unknown[]): void;
|
||||
warn(msg: string, ...args: unknown[]): void;
|
||||
error(msg: string, ...args: unknown[]): void;
|
||||
fatal(msg: string, ...args: unknown[]): void;
|
||||
child(bindings: Record<string, unknown>): LoggerService;
|
||||
}
|
||||
|
||||
@@ -30,35 +30,41 @@ export class PinoLoggerService implements LoggerService {
|
||||
}
|
||||
}
|
||||
|
||||
trace(msg: string, ...args: any[]) {
|
||||
this.logger.trace(msg, ...args);
|
||||
trace(msg: string, ...args: unknown[]) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
this.logger.trace(msg, ...(args as any));
|
||||
}
|
||||
|
||||
debug(msg: string, ...args: any[]) {
|
||||
this.logger.debug(msg, ...args);
|
||||
debug(msg: string, ...args: unknown[]) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
this.logger.debug(msg, ...(args as any));
|
||||
}
|
||||
|
||||
info(msg: string, ...args: any[]) {
|
||||
this.logger.info(msg, ...args);
|
||||
info(msg: string, ...args: unknown[]) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
this.logger.info(msg, ...(args as any));
|
||||
}
|
||||
|
||||
warn(msg: string, ...args: any[]) {
|
||||
this.logger.warn(msg, ...args);
|
||||
warn(msg: string, ...args: unknown[]) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
this.logger.warn(msg, ...(args as any));
|
||||
}
|
||||
|
||||
error(msg: string, ...args: any[]) {
|
||||
this.logger.error(msg, ...args);
|
||||
error(msg: string, ...args: unknown[]) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
this.logger.error(msg, ...(args as any));
|
||||
}
|
||||
|
||||
fatal(msg: string, ...args: any[]) {
|
||||
this.logger.fatal(msg, ...args);
|
||||
fatal(msg: string, ...args: unknown[]) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
this.logger.fatal(msg, ...(args as any));
|
||||
}
|
||||
|
||||
child(bindings: Record<string, any>): LoggerService {
|
||||
child(bindings: Record<string, unknown>): LoggerService {
|
||||
const childPino = this.logger.child(bindings);
|
||||
const service = new PinoLoggerService();
|
||||
// @ts-expect-error - accessing private member for child creation
|
||||
service.logger = childPino;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(service as any).logger = childPino;
|
||||
return service;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user