-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When ANSI
is enabled, nu_ansi_term::enable_ansi_support()
should be called on Windows
#3068
Comments
I think this is fine, the problem is just where to put it... We can't put it in the (fmt) Subscriber::with_ansi function, because that's not the only place we set the ansi attribute. We would need to add this everywhere. |
Yes, when I wrote this issue, I originally intended to submit a PR directly, but later I realized it wasn't that simple... The key issue is, as you said, where should we put it... However, no matter how it is implemented, I believe this logic should indeed be part of the |
To correctly enable the ansi output, we need to call `nu_ansi_term::enable_ansi_support` on windows before outputting ansi characters. Fixes: tokio-rs#3068
Bug Report
Version
tracing-subscriber: v0.3.18
Platform
64-bit (Windows)
Crates
tracing-subscriber
Description
When
ANSI
is enabled,nu_ansi_term::enable_ansi_support()
should be called onWindows
, otherwise the ANSI color will appear as garbled (as it is now).I know users can manually call this to solve the problem, but I believe that
tracing-subscriber
should provide an out-of-the-box solution for this, and the call should be transparent to users. Therefore, I think this is a bug that needs to be fixed.The text was updated successfully, but these errors were encountered: