Repository navigation
fix(minimal): render plain console warnings as warning/error lines - #2022
norrietaylor merged 2 commits into
Conversation
The plain console layer (no RUST_LOG) rendered WARN events through the
default tracing format, producing a padded, upper-case level record
(" WARN ...") instead of a user-facing "warning: ..." line. The upgrade
hint for unknown minimal.toml keys also printed as a second warning
rather than a "help:" line.
Replace the plain branch's default format with a small FormatEvent that
writes "warning: " for WARN and "error: " for ERROR, leaving INFO and
below as the bare message. A message already starting with "help:" is
written as a help line with no level prefix. The RUST_LOG path keeps the
full tracing format unchanged.
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25. Or wait 35 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. 📝 WalkthroughWalkthroughThe plain tracing output now prefixes WARN messages with ChangesPlain tracing output
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change adjusts how warnings and errors are displayed in plain console output. No actionable merge risk was found. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Fin 8000 ishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the warning line, Comment |
|
/review |
|
Approved: no findings at Nothing to do. Clobber: none: |
There was a problem hiding this comment.
minimal-review approved this head; CodeRabbit approved the code (later commit is doc comments only); 0 unresolved threads.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVa6l7w
Problem
The
minCLI's plain console layer (noRUST_LOGin effect) rendereduser-facing warnings through the default tracing format, producing a padded,
upper-case level record (
WARN ...) instead of awarning: ...line. Theupgrade hint for unknown
minimal.tomlkeys also printed as a second warningrather than a
help:line.Change
Replace the plain branch's default format in
console_layerwith a smallFormatEventthat writeswarning:for WARN anderror:for ERROR,leaving INFO and below as the bare message. A message already starting with
help:is written as a help line with no level prefix. TheRUST_LOGpathkeeps the full tracing format (timestamp and target) unchanged.
Verification
cargo fmt --all --check— cleancargo clippy --workspace --all-targets --locked -- -D warnings— cleancargo test --locked -p minimal --bin min— 13 passedSummary by CodeRabbit
RUST_LOGnow display warnings with awarning:prefix and errors with anerror:prefix. Warning messages beginning withhelp:keep their existing prefix, and other log levels remain unprefixed.RUST_LOGcontinue to use the full tracing format.