Skip to content

fix(plugin): respect debug option for all debug log messages#3684

Merged
kamilmysliwiec merged 1 commit intonestjs:masterfrom
jtomaszewski:fix/debug-option-check
Jan 14, 2026
Merged

fix(plugin): respect debug option for all debug log messages#3684
kamilmysliwiec merged 1 commit intonestjs:masterfrom
jtomaszewski:fix/debug-option-check

Conversation

@jtomaszewski
Copy link
Copy Markdown
Contributor

Description

Two pluginDebugLogger.debug() calls in model-class.visitor.ts were outputting messages unconditionally without checking options.debug:

  1. Line ~201: Conflicting decorators message
  2. Line ~774: Skipping default value message

This caused noisy DEBUG logs to appear during development even when debug: false was set in nest-cli.json plugin options:

[Nest] DEBUG [CLI Plugin] Skipping registering default value for "progressions" property in "..." file because it is not a referenceable value ("new Collection<...>(this)").

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

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manual testing by setting debug: false in nest-cli.json and confirming that the debug messages no longer appear.

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).
@kamilmysliwiec kamilmysliwiec merged commit e070838 into nestjs:master Jan 14, 2026
1 check passed
@kamilmysliwiec
Copy link
Copy Markdown
Member

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants