Rollup merge of #79238 - eddyb:rustc-log-stderr, r=jyn514

Direct RUSTC_LOG (tracing/log) output to stderr instead of stdout.

Looks like this got missed in the initial implementation, AFAIK the old behavior was to output on stderr.
(Hit this while trying to debug `rustc` running inside a build script which was only letting stderr through)

r? ``@oli-obk`` cc ``@davidbarsky`` ``@hawkw``
This commit is contained in:
Dylan DPC 2020-11-21 19:44:15 +01:00 committed by GitHub
commit 3958ceccac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1286,6 +1286,7 @@ pub fn init_env_logger(env: &str) {
}
let filter = tracing_subscriber::EnvFilter::from_env(env);
let layer = tracing_tree::HierarchicalLayer::default()
.with_writer(io::stderr)
.with_indent_lines(true)
.with_ansi(true)
.with_targets(true)