From 1f7620c6f5eaf8c0973c78248957bee41c5f3a6d Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 21 Mar 2024 20:11:15 -0400 Subject: [PATCH] chore: Add warning if enabling debug logging while filtering it out, closes #6691 --- server/logging/Logger.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/logging/Logger.ts b/server/logging/Logger.ts index 7e8989e2e..67a55a38d 100644 --- a/server/logging/Logger.ts +++ b/server/logging/Logger.ts @@ -49,6 +49,7 @@ class Logger { ? env.LOG_LEVEL : "info", }); + this.output.add( new winston.transports.Console({ format: env.isProduction @@ -64,6 +65,16 @@ class Logger { ), }) ); + + if ( + env.DEBUG && + env.DEBUG !== "http" && + !["silly", "debug"].includes(env.LOG_LEVEL) + ) { + this.warn( + `"DEBUG" set in configuration but the "LOG_LEVEL" configuration is filtering debug messages. To see all logging, set "LOG_LEVEL" to "debug".` + ); + } } /**