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
@@ -6,7 +6,7 @@ import {
|
||||
PaginatedResult,
|
||||
PaginationQueryDto,
|
||||
} from "../common/dto/pagination.dto";
|
||||
import { TraceLogger } from "../common/trace-logger";
|
||||
import { createAppLogger } from "../common/app-logger";
|
||||
import { SessionEntity } from "./session.entity";
|
||||
|
||||
export type SessionOrderBy =
|
||||
@@ -19,7 +19,7 @@ export type SessionOrderBy =
|
||||
|
||||
@Injectable()
|
||||
export class SessionService implements OnApplicationBootstrap {
|
||||
private readonly logger = new TraceLogger(SessionService.name);
|
||||
private readonly logger = createAppLogger(SessionService.name);
|
||||
|
||||
constructor(
|
||||
@InjectRepository(SessionEntity)
|
||||
|
||||
Reference in new issue
Block a user