Closed leahneukirchen closed 4 months ago
Hello,
Thanks for reporting, I am going to remove the line and add a comment in the CLI to let know the option exist. Should land tomorrow, I don't have that much time today.
Thanks, no hurry!
Should be good in new release https://github.com/erebe/wstunnel/releases/tag/v8.4.2
You can set the env var NO_COLOR or use the flag --no-color to disable color output https://github.com/erebe/wstunnel/commit/89c840539686e489bc5f7faae94751bb12b725d6
Enjoy :)
Is your feature request related to a problem? Please describe.
wstunnel prints ANSI codes in the log messages, even if the logs don't go to a console. This results in escape sequences in log files.
Describe the solution you'd like
wstunnel should use isatty(2) to determine whether to use coloring in logs. It's probably enough to remove
.with_ansi(true)
, as colors are enabled by default https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/struct.Layer.html#method.with_ansi but can then be disabled by setting NO_COLOR.Describe alternatives you've considered
Alternatively a flag could be provided.
Setting
RUST_LOG_STYLE
did not work for me.