error messages often written to stdout rather than stderr
Problem
When rustup emits error messages, these sometimes appear on the stdout stream, instead of the stderr stream. This makes it harder for aggregate CLI commands to distinguish between logs (such as lists of target triples) vs. error messages.
Steps
- Run
rustup target list foowith and without redirecting stdout to a null stream.
Possible Solution(s)
Ensure that all error messages write to the stderr stream, rather than stdout.
Notes
No response
Rustup version
rustup 1.25.2 (17db695f1 2023-02-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.68.2 (9eb3afe9e 2023-03-27)`
Installed toolchains
Default host: aarch64-apple-darwin
rustup home: /Users/andrew/.asdf/installs/rust/1.68.2
installed toolchains
--------------------
1.68.2-aarch64-apple-darwin (default)
1.68.2-x86_64-unknown-linux-gnu
active toolchain
----------------
1.68.2-aarch64-apple-darwin (default)
rustc 1.68.2 (9eb3afe9e 2023-03-27)
@mcandre Thanks for filing this issue! Do you happen to remember what exactly did you not expect to appear in stdout?
Your observations are quite important for #3803 as I'm planning to move the whole logging system to tracing (it currently targets stderr exclusively) and I do want to get more insights into the original implementation and its issues. Thanks!