Skip to content

Commit c15845b

Browse files
committed
when MIRI_LOG is set, set RUSTC_LOG_ENTRY_EXIT
1 parent 6005f5d commit c15845b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bin/miri.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ fn init_early_loggers() {
155155
// initialize them both, and we always initialize `miri`'s first.
156156
let env = env_logger::Env::new().filter("MIRI_LOG").write_style("MIRI_LOG_STYLE");
157157
env_logger::init_from_env(env);
158+
// Enable verbose entry/exit logging by default if MIRI_LOG is set.
159+
if env::var_os("MIRI_LOG").is_some() && env::var_os("RUSTC_LOG_ENTRY_EXIT").is_none() {
160+
env::set_var("RUSTC_LOG_ENTRY_EXIT", "1");
161+
}
158162
// We only initialize `rustc` if the env var is set (so the user asked for it).
159163
// If it is not set, we avoid initializing now so that we can initialize
160164
// later with our custom settings, and *not* log anything for what happens before

0 commit comments

Comments
 (0)