about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-10-11 14:11:44 +0200
committerGitHub <noreply@github.com>2021-10-11 14:11:44 +0200
commit9183942e8383b4a2c40f8eeb872c71ab3d8c60fe (patch)
treefd3c0d18c2cf3631ea6cfbabc638fd86e9fa00c0
parent77be7e441a32ae160bc79dba1a28c1c2839a3a19 (diff)
parent9e6e89af697dad4e4505111adef37733cdcbe47e (diff)
downloadrust-9183942e8383b4a2c40f8eeb872c71ab3d8c60fe.tar.gz
rust-9183942e8383b4a2c40f8eeb872c71ab3d8c60fe.zip
Rollup merge of #89743 - matthewjasper:env-log-fix, r=jyn514
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.
-rw-r--r--compiler/rustc_driver/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs
index 05c7e11cbc2..9a57ec99144 100644
--- a/compiler/rustc_driver/src/lib.rs
+++ b/compiler/rustc_driver/src/lib.rs
@@ -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)),
     };