]> git.lizzy.rs Git - rust.git/commitdiff
RUST_LOG got renamed to RUSTC_LOG
authorRalf Jung <post@ralfj.de>
Mon, 13 May 2019 12:10:52 +0000 (14:10 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 13 May 2019 12:10:52 +0000 (14:10 +0200)
src/bin/miri.rs

index 6e68f803f8584e0a6cd9cffb08d951ed9beea32b..272fd17d433cb1b8a9bbbee8e71e7c6f77fed39c 100644 (file)
@@ -66,26 +66,26 @@ fn init_early_loggers() {
     // If it is not set, we avoid initializing now so that we can initialize
     // later with our custom settings, and *not* log anything for what happens before
     // `miri` gets started.
-    if env::var("RUST_LOG").is_ok() {
+    if env::var("RUSTC_LOG").is_ok() {
         rustc_driver::init_rustc_env_logger();
     }
 }
 
 fn init_late_loggers() {
-    // We initialize loggers right before we start evaluation. We overwrite the `RUST_LOG`
+    // We initialize loggers right before we start evaluation. We overwrite the `RUSTC_LOG`
     // env var if it is not set, control it based on `MIRI_LOG`.
     if let Ok(var) = env::var("MIRI_LOG") {
-        if env::var("RUST_LOG").is_err() {
+        if env::var("RUSTC_LOG").is_err() {
             // We try to be a bit clever here: if `MIRI_LOG` is just a single level
             // used for everything, we only apply it to the parts of rustc that are
-            // CTFE-related. Otherwise, we use it verbatim for `RUST_LOG`.
+            // CTFE-related. Otherwise, we use it verbatim for `RUSTC_LOG`.
             // This way, if you set `MIRI_LOG=trace`, you get only the right parts of
             // rustc traced, but you can also do `MIRI_LOG=miri=trace,rustc_mir::interpret=debug`.
             if log::Level::from_str(&var).is_ok() {
-                env::set_var("RUST_LOG",
+                env::set_var("RUSTC_LOG",
                     &format!("rustc::mir::interpret={0},rustc_mir::interpret={0}", var));
             } else {
-                env::set_var("RUST_LOG", &var);
+                env::set_var("RUSTC_LOG", &var);
             }
             rustc_driver::init_rustc_env_logger();
         }