Summary
Diagnostics (e.g. logging) should go to stderr. Output of a program should go to stdout.
Expected behavior
tracing_subscriber to log to stderr.
Actual behavior
tracing_subscriber is logging to stdout.
Upstream bug report tokio-rs/tracing#2492
Relevant log output
No response
Possible Solution
One can easily override the default:
let _ = tracing_subscriber::fmt()
.with_env_filter(EnvFilter::from_default_env())
.with_writer(std::io::stderr)
.try_init();
Initialization of tracing_subscriber is already quite noisy. E.g. it requires 4 lines instead of the 1 line of env_logger. Should we introduce some abstraction?
Version
tracing_subscriber introduced with #4282.
Would you like to work on fixing this bug ?
No
Summary
Diagnostics (e.g. logging) should go to stderr. Output of a program should go to stdout.
Expected behavior
tracing_subscriberto log to stderr.Actual behavior
tracing_subscriberis logging to stdout.Upstream bug report tokio-rs/tracing#2492
Relevant log output
No response
Possible Solution
One can easily override the default:
Initialization of
tracing_subscriberis already quite noisy. E.g. it requires 4 lines instead of the 1 line ofenv_logger. Should we introduce some abstraction?Version
tracing_subscriberintroduced with #4282.Would you like to work on fixing this bug ?
No