From 17801b0b13ad3cf424bbdc93cc05c79ac4524265 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Sun, 5 Jan 2025 14:03:49 +0700 Subject: [PATCH] [core] Set log level to "trace" if specified --- src/utils/logging.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/logging.ts b/src/utils/logging.ts index 2253b7ce..5762519d 100644 --- a/src/utils/logging.ts +++ b/src/utils/logging.ts @@ -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() {