Forge
RUST_LOG_STYLE=never seems to have no effect on forge, making it difficult to post logs without ansi codes. RUST_LOG=trace seems to have no effect on cast.
No response
There are no traces in Cast, I think. As for RUST_LOG_STYLE
, I'm not sure why it doesn't work but it should
I had TERM=text and a couple of others trying to remember what terminfo name has no color, but I see in that link that "dumb" should work. Strangely, setting TERM=dumb also has no effect on colorization.
There are no traces in Cast, I think. As for
RUST_LOG_STYLE
, I'm not sure why it doesn't work but it should
this is env_logger but we log via https://github.com/tokio-rs/tracing and I'm not sure if their env filter supports that
Right, so we should likely use https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/struct.Layer.html#method.set_ansi - perhaps we can tie that in with some general color detection util that checks COLOR
/terminfo etc?
Hey, just adding this here since it's a nit in the logging crate. If when you look at logging in general maybe you can emit a better error that at least mentions the RUST_LOG variable (or that the error is in regards to logging).
$ export RUST_LOG=
$ forge --version
ignoring ``: invalid filter directive
forge 0.2.0 (64087b5 2022-04-13T00:10:42.429318924+00:00)
That error is from the logging crate itself, so it's not something we can fix here :/
Fair enough, but since you are using the package, you could avoid this weird edge case by doing: "if(env(RUST_LOG)=="")deleteEnv("RUST_LOG");"
Happy to submit an issue to them but I'm not a RUST coder and don't know where to find crate projects etc. Point me?