-
Notifications
You must be signed in to change notification settings - Fork 838
Description
Feature Request
#3368 starts escaping ANSI control sequences to avoid actions such as setting the titlebar and screen clearing. To do so, it escapes all ANSI control sequences.
The change in #3368 has led to users confused about why there are escape sequences in their output (astral-sh/uv#15840).
Would it be possible to only escape (or better, strip) non-color control sequences? Color codes are purely decorative, unlike other control characters. This would allow us to continue logging color-adorned messages in CLI logs.
This feature request has the same motivation but a different specific request than #3369.
Crates
tracing-subscriber
Alternatives
If it it not possible to filter for specific ANSI escapes, would it be possible to strip ANSI escapes instead of escaping them, and to add an option to allow us to perform our own filtering? We're already using anstream as output stream to strip ANSI sequences for non-color targets, we can extend this to perform the filtering for dangerous codes ourselves.