Skip to content

Commit

Permalink
Rollup merge of rust-lang#89743 - matthewjasper:env-log-fix, r=jyn514
Browse files Browse the repository at this point in the history
Fix RUSTC_LOG handling

Rustc was incorrectly reading the value of `RUSTC_LOG` as the environment vairable with the logging configuration, rather than the logging configuration itself.
  • Loading branch information
matthiaskrgr committed Oct 11, 2021
2 parents f3c613e + 9e6e89a commit 5fce6d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ pub fn init_env_logger(env: &str) {
};

let filter = match std::env::var(env) {
Ok(env) => EnvFilter::from_env(env),
Ok(env) => EnvFilter::new(env),
_ => EnvFilter::default().add_directive(filter::Directive::from(LevelFilter::WARN)),
};

Expand Down

0 comments on commit 5fce6d6

Please sign in to comment.