55 clippy:: useless_format,
66 clippy:: field_reassign_with_default,
77 rustc:: diagnostic_outside_of_impl,
8- rustc:: untranslatable_diagnostic,
8+ rustc:: untranslatable_diagnostic
99) ]
1010
1111extern crate rustc_data_structures;
@@ -16,14 +16,14 @@ extern crate rustc_log;
1616extern crate rustc_metadata;
1717extern crate rustc_middle;
1818extern crate rustc_session;
19+ #[ macro_use]
20+ extern crate tracing;
1921
2022use std:: env:: { self , VarError } ;
2123use std:: num:: NonZero ;
2224use std:: path:: PathBuf ;
2325use std:: str:: FromStr ;
2426
25- use log:: debug;
26-
2727use rustc_data_structures:: sync:: Lrc ;
2828use rustc_driver:: Compilation ;
2929use rustc_hir:: { self as hir, Node } ;
@@ -200,7 +200,7 @@ fn rustc_logger_config() -> rustc_log::LoggerConfig {
200200 // CTFE-related. Otherwise, we use it verbatim for `RUSTC_LOG`.
201201 // This way, if you set `MIRI_LOG=trace`, you get only the right parts of
202202 // rustc traced, but you can also do `MIRI_LOG=miri=trace,rustc_const_eval::interpret=debug`.
203- if log :: Level :: from_str ( & var) . is_ok ( ) {
203+ if tracing :: Level :: from_str ( & var) . is_ok ( ) {
204204 cfg. filter = Ok ( format ! (
205205 "rustc_middle::mir::interpret={var},rustc_const_eval::interpret={var}"
206206 ) ) ;
@@ -218,10 +218,6 @@ fn rustc_logger_config() -> rustc_log::LoggerConfig {
218218}
219219
220220fn init_early_loggers ( early_dcx : & EarlyDiagCtxt ) {
221- // Note that our `extern crate log` is *not* the same as rustc's; as a result, we have to
222- // initialize them both, and we always initialize `miri`'s first.
223- let env = env_logger:: Env :: new ( ) . filter ( "MIRI_LOG" ) . write_style ( "MIRI_LOG_STYLE" ) ;
224- env_logger:: init_from_env ( env) ;
225221 // Now for rustc. We only initialize `rustc` if the env var is set (so the user asked for it).
226222 // If it is not set, we avoid initializing now so that we can initialize later with our custom
227223 // settings, and *not* log anything for what happens before `miri` gets started.
0 commit comments