fix(plugin): respect debug option for all debug log messages#3684
Merged
kamilmysliwiec merged 1 commit intonestjs:masterfrom Jan 14, 2026
Merged
fix(plugin): respect debug option for all debug log messages#3684kamilmysliwiec merged 1 commit intonestjs:masterfrom
kamilmysliwiec merged 1 commit intonestjs:masterfrom
Conversation
Two pluginDebugLogger.debug() calls in model-class.visitor.ts were outputting messages unconditionally without checking options.debug: 1. Conflicting decorators message (~line 201) 2. Skipping default value message (~line 774) This caused noisy DEBUG logs to appear during development even when debug: false was set in nest-cli.json plugin options. This change wraps both debug calls with if (options.debug) checks, consistent with the existing pattern used elsewhere in the same file (e.g., line 118 for skipping unexported classes).
Member
|
lgtm |
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.
Description
Two
pluginDebugLogger.debug()calls inmodel-class.visitor.tswere outputting messages unconditionally without checkingoptions.debug:This caused noisy DEBUG logs to appear during development even when
debug: falsewas set innest-cli.jsonplugin options:Changes
This PR wraps both debug calls with
if (options.debug)checks, consistent with the existing pattern used elsewhere in the same file (e.g., line 118 for skipping unexported classes).Type of change
How Has This Been Tested?
Manual testing by setting
debug: falseinnest-cli.jsonand confirming that the debug messages no longer appear.