DX-9992 | Show errors and warnings on console in progress-manager mode#2664
Open
harshitha-cstk wants to merge 1 commit into
Open
DX-9992 | Show errors and warnings on console in progress-manager mode#2664harshitha-cstk wants to merge 1 commit into
harshitha-cstk wants to merge 1 commit into
Conversation
…ger mode Progress-supported modules (e.g. bulk-operations) omitted the console transport entirely when console logs were disabled, so errors and warnings — like an invalid stack API key or a taxonomy error — were written to file but silently swallowed on screen. Attach the console transport for error and warn levels regardless of showConsoleLogs, while keeping info/success/debug hidden so the progress bars stay clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
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.
What
When a progress-supported module (e.g.
bulk-operations) runs with console logs disabled (progress-bar UI mode), error and warning messages are not shown on screen. A failing bulk operation — such as an invalid stack API key or a taxonomy error — completes with nothing printed.Why
In
logger.tsthe Console transport was attached only whenshowConsoleLogswas true. For progress-supported modules that value defaults tofalse, so no level (includingerror/warn) got a console transport. The message was still written to the error/warn log file, but nothing reached the terminal — silently swallowed.Fix
packages/contentstack-utilities/src/logger/logger.ts— attach the Console transport when console logs are enabled or the level iserror/warn:Each level has its own winston logger instance, so this surfaces errors and warnings while keeping
info/success/debughidden — the progress bars stay clean. No change to theshowConsoleLogs: truepath.Impact
Tests
New
Console output in progress-manager modeblock inlogger.test.ts, 4 cases: error surfaces, warn surfaces, info stays hidden, and console-on regression. Full utilities suite green (198 passing).🤖 Generated with Claude Code