/** * Simple Logger interface compatible with complex Logger implementations * that use pino, tsyringe, and other advanced features. * * This interface matches the signature pattern: * - payload: { [key: string]: any } - context/metadata object * - msg?: string - optional message * - ...args: any[] - optional format string values */ export interface Logger { log: (payload: { [key: string]: any }, msg?: string, ...args: any[]) => void; info: (payload: { [key: string]: any }, msg?: string, ...args: any[]) => void; error: (payload: { [key: string]: any }, msg?: string, ...args: any[]) => void; warn: (payload: { [key: string]: any }, msg?: string, ...args: any[]) => void; debug: (payload: { [key: string]: any }, msg?: string, ...args: any[]) => void; trace?: (payload: { [key: string]: any }, msg?: string, ...args: any[]) => void; child?: (name: string) => Logger; logRaw?: (...args: any[]) => void; } /** * No-operation Logger implementation for testing or when logging is disabled */ export const NoopLogger: Logger = { log: () => { // no-op }, info: () => { // no-op }, error: () => { // no-op }, warn: () => { // no-op }, debug: () => { // no-op }, trace: () => { // no-op }, // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - name parameter required for interface compatibility child: (name: string) => NoopLogger, logRaw: () => { // no-op }, };