Repository navigation
fix: honor silent settings in level-enabled checks - #2646
Open
Shubham-Padkonde wants to merge 1 commit into
Open
Shubham-Padkonde wants to merge 1 commit into
Shubham-Padkonde wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
isLevelEnabled()and the generated helpers such asisDebugEnabled()currently return true even when logging is suppressed bysilent. Callers using these helpers to avoid preparing unused messages still do that work for a muted logger or transport.Return false when the logger is silent and exclude silent transports when checking their levels. Active transports retain their existing thresholds, and changing
silentat runtime is reflected on the next check. This changes the helpers only; it does not change message delivery or formatting.Three new regressions cover a silent logger, a silent transport, and mixed active/silent transports. All three fail before the fix; all 68 logger tests pass afterward (one existing todo). Repository lint passes with ten existing warnings.
The broader Windows run passes 235 tests, with three todos and five file-transport failures. Those same five failures also occur with the original logger implementation; the baseline file-only run has nine failures in total. The broader suite leaves open handles, so the subsequent focused runs use Jest's
--forceExit.