Skip to content

Commit

Permalink
Rollup merge of #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
GuillaumeGomez authored Oct 11, 2021
2 parents 77be7e4 + 9e6e89a commit 9183942
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 9183942

Please sign in to comment.