fix: stop RUST_LOG from leaking tracing messages into TUI alt-screen on Windows#1776
Closed
aboimpinto wants to merge 6 commits into
Closed
fix: stop RUST_LOG from leaking tracing messages into TUI alt-screen on Windows#1776aboimpinto wants to merge 6 commits into
aboimpinto wants to merge 6 commits into
Conversation
…on Windows Only DEEPSEEK_LOG_LEVEL should gate verbose CLI output. RUST_LOG controls the tracing subscriber independently (file logging). On Windows stderr is not redirected to the log file, so coupling the two causes tracing log messages to leak into the TUI alt-screen, corrupting the display. Closes Hmbown#1774
Contributor
There was a problem hiding this comment.
Code Review
This pull request decouples the RUST_LOG environment variable from the CLI's verbose logging logic in crates/tui/src/logging.rs to prevent log leakage into the TUI, particularly on Windows. Feedback suggests refining the documentation to more accurately distinguish between tracing crate messages and internal CLI verbose messages emitted via eprintln!.
…criber in logging.rs Addresses gemini-code-assist review feedback on PR Hmbown#1776.
aboimpinto
added a commit
to aboimpinto/CodeWhale
that referenced
this pull request
May 18, 2026
…criber in logging.rs Addresses gemini-code-assist review feedback on PR Hmbown#1776.
aboimpinto
added a commit
to aboimpinto/CodeWhale
that referenced
this pull request
May 18, 2026
…criber in logging.rs Addresses gemini-code-assist review feedback on PR Hmbown#1776.
aboimpinto
added a commit
to aboimpinto/CodeWhale
that referenced
this pull request
May 19, 2026
…criber in logging.rs Addresses gemini-code-assist review feedback on PR Hmbown#1776.
aboimpinto
added a commit
to aboimpinto/CodeWhale
that referenced
this pull request
May 19, 2026
…criber in logging.rs Addresses gemini-code-assist review feedback on PR Hmbown#1776.
aboimpinto
added a commit
to aboimpinto/CodeWhale
that referenced
this pull request
May 19, 2026
…criber in logging.rs Addresses gemini-code-assist review feedback on PR Hmbown#1776.
11 tasks
Owner
aboimpinto
added a commit
to aboimpinto/CodeWhale
that referenced
this pull request
May 21, 2026
…criber in logging.rs Addresses gemini-code-assist review feedback on PR Hmbown#1776.
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.
Summary
Fix a Windows-specific bug where
RUST_LOGenvironment variable (commonly set for tracing) causes tracing log messages to leak into the DeepSeek-TUI alt-screen, corrupting the terminal display.Problem
When running DeepSeek-TUI with verbose logging enabled (
DEEPSEEK_LOG_LEVEL=debugor--verbose), theenv_requests_verbose_logging()function incrates/tui/src/logging.rswas checking bothDEEPSEEK_LOG_LEVELandRUST_LOG:RUST_LOGcontrols thetracingsubscriber filter inruntime_log.rs(file logging). On Windows, stderr is not redirected to the log file. WhenRUST_LOGis set totrace/debug/info, it incorrectly activates verbose CLI output, causing tracing messages to spill onto the TUI alt-screen display.Fix
Remove
RUST_LOGfromenv_requests_verbose_logging(). OnlyDEEPSEEK_LOG_LEVELshould gate CLI verbose output:Steps to Reproduce
RUST_LOG=tracedeepseek-tui --verboseChanges
crates/tui/src/logging.rs: RemoveRUST_LOGcheck from verbose output gateRUST_LOGis intentionally excludedCloses #1774