refactor(logging): separate console and debug logger classes
- 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:
1 parent
ceed27ad9e
commit
7235abdcef
16 files changed
+146
-142
No files matched your search
@@ -4,7 +4,7 @@ import { SchedulerRegistry } from "@nestjs/schedule";
|
||||
import { InjectRepository } from "@nestjs/typeorm";
|
||||
import { CronJob } from "cron";
|
||||
import { LessThanOrEqual, Repository } from "typeorm";
|
||||
import { TraceLogger } from "../common/trace-logger";
|
||||
import { createAppLogger } from "../common/app-logger";
|
||||
import { AppConfig } from "../config/app.config";
|
||||
import { RevokedTokenEntity } from "./revoked-token.entity";
|
||||
|
||||
@@ -12,7 +12,7 @@ export const AUTH_REVOKED_TOKEN_CLEANUP_JOB = "auth-revoked-token-cleanup";
|
||||
|
||||
@Injectable()
|
||||
export class RevokedTokenCleanupService implements OnModuleInit {
|
||||
private readonly logger = new TraceLogger(RevokedTokenCleanupService.name);
|
||||
private readonly logger = createAppLogger(RevokedTokenCleanupService.name);
|
||||
private readonly enabled: boolean;
|
||||
private readonly cleanupCron: string;
|
||||
|
||||
|
||||
Reference in new issue
Block a user