refactor(logging): separate console and debug logger classes
CI / changes (pull_request) Successful in 6s
CI / server (pull_request) Failing after 34m29s
CI / client (pull_request) Successful in 3m0s
CI / image (pull_request) Skipped

- Preserve TraceLogger console formatting and add DebugLogger with DEBUG namespace output.
- Select the logger through LOG_MODE and route application call sites through the factory.
- Cover factory selection, console formatting, debug output and auth-log redaction.
This commit is contained in:
agent committed 2026-11-11 14:30:37 -05:00
1 parent ceed27ad9e
commit 7235abdcef
16 files changed
+146 -142

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@ import * as fs from "node:fs/promises";
import * as path from "node:path";
import { CronJob } from "cron";
import { Repository } from "typeorm";
import { TraceLogger } from "../common/trace-logger";
import { createAppLogger } from "../common/app-logger";
import { AppConfig } from "../config/app.config";
import { FileEntity } from "./file.entity";
import { ScenarioFileEntity } from "./scenario-file.entity";
@@ -27,7 +27,7 @@ export interface FileMetadata {
@Injectable()
export class FileStorageService implements OnModuleInit {
private static readonly DEFAULT_PAGE_SIZE = 20;
private readonly logger = new TraceLogger(FileStorageService.name);
private readonly logger = createAppLogger(FileStorageService.name);
private readonly filesDir: string;
private readonly fileRunExpirationDays: number;
private readonly fileCleanupCron: string;