Skip to content

Commit ada5edb

Browse files
committed
RUST_LOG got renamed to RUSTC_LOG
1 parent 7f09e61 commit ada5edb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/bin/miri.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,26 @@ fn init_early_loggers() {
6666
// If it is not set, we avoid initializing now so that we can initialize
6767
// later with our custom settings, and *not* log anything for what happens before
6868
// `miri` gets started.
69-
if env::var("RUST_LOG").is_ok() {
69+
if env::var("RUSTC_LOG").is_ok() {
7070
rustc_driver::init_rustc_env_logger();
7171
}
7272
}
7373

7474
fn init_late_loggers() {
75-
// We initialize loggers right before we start evaluation. We overwrite the `RUST_LOG`
75+
// We initialize loggers right before we start evaluation. We overwrite the `RUSTC_LOG`
7676
// env var if it is not set, control it based on `MIRI_LOG`.
7777
if let Ok(var) = env::var("MIRI_LOG") {
78-
if env::var("RUST_LOG").is_err() {
78+
if env::var("RUSTC_LOG").is_err() {
7979
// We try to be a bit clever here: if `MIRI_LOG` is just a single level
8080
// used for everything, we only apply it to the parts of rustc that are
81-
// CTFE-related. Otherwise, we use it verbatim for `RUST_LOG`.
81+
// CTFE-related. Otherwise, we use it verbatim for `RUSTC_LOG`.
8282
// This way, if you set `MIRI_LOG=trace`, you get only the right parts of
8383
// rustc traced, but you can also do `MIRI_LOG=miri=trace,rustc_mir::interpret=debug`.
8484
if log::Level::from_str(&var).is_ok() {
85-
env::set_var("RUST_LOG",
85+
env::set_var("RUSTC_LOG",
8686
&format!("rustc::mir::interpret={0},rustc_mir::interpret={0}", var));
8787
} else {
88-
env::set_var("RUST_LOG", &var);
88+
env::set_var("RUSTC_LOG", &var);
8989
}
9090
rustc_driver::init_rustc_env_logger();
9191
}

0 commit comments

Comments
 (0)