Skip to content

Commit

Permalink
Actually ignore logging disabled modules
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFerr committed Sep 14, 2023
1 parent a46989a commit a837776
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/902.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Let file logs correctly ignore modules matching "logging.files[*].disabled" in the configuration file.
2 changes: 1 addition & 1 deletion src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
) {
Expand Down

0 comments on commit a837776

Please sign in to comment.