Skip to content

Commit

Permalink
[core] Set log level to "trace" if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
devlikepro committed Jan 8, 2025
1 parent 9010388 commit 17801b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ function getNestJSLogLevels(): LogLevel[] {

export function getPinoLogLevel(debug: boolean = false): Level {
const enableDebug = process.env.DEBUG != undefined || debug;
const level = getDefaultPinoLogLevel();
if (level === 'trace') {
return 'trace';
}
if (enableDebug) {
return 'debug';
}
return getDefaultPinoLogLevel();
return level;
}

export function isDebugEnabled() {
Expand Down

0 comments on commit 17801b0

Please sign in to comment.