Skip to content

Commit

Permalink
Rollup merge of #79238 - eddyb:rustc-log-stderr, r=jyn514
Browse files Browse the repository at this point in the history
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``
  • Loading branch information
Dylan-DPC committed Nov 21, 2020
2 parents bb73ea6 + 5ed2d42 commit 3958cec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3958cec

Please sign in to comment.