From a837776f32b4e2f5406a7e66bcde546ed89ff773 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Thu, 14 Sep 2023 18:34:13 -0400 Subject: [PATCH] Actually ignore logging disabled modules --- changelog.d/902.bugfix | 1 + src/log.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/902.bugfix diff --git a/changelog.d/902.bugfix b/changelog.d/902.bugfix new file mode 100644 index 00000000..b93fa650 --- /dev/null +++ b/changelog.d/902.bugfix @@ -0,0 +1 @@ +Let file logs correctly ignore modules matching "logging.files[*].disabled" in the configuration file. diff --git a/src/log.ts b/src/log.ts index 085b7b22..3aa3c9c6 100644 --- a/src/log.ts +++ b/src/log.ts @@ -78,7 +78,7 @@ export class Log { private static setupFileTransport(config: LoggingFile): transports.FileTransportInstance { config = Object.assign(new LoggingFile(), config); const filterOutMods = format((info, _) => { - if (config.disabled.includes(info.module) && + if (config.disabled.includes(info.module) || config.enabled.length > 0 && !config.enabled.includes(info.module) ) {