import { ConsoleLoggerOptions } from "@nestjs/common"; import { LogMode } from "../config/app.config"; import { DebugLogger } from "./debug-logger"; import { TraceLogger } from "./trace-logger"; /** Select the application's logger implementation at the configuration boundary. */ export function createAppLogger( context?: string, options?: ConsoleLoggerOptions, ) { return process.env.LOG_MODE === LogMode.Debug ? new DebugLogger(context, options) : new TraceLogger(context, options); }