5
5
clippy:: useless_format,
6
6
clippy:: field_reassign_with_default,
7
7
rustc:: diagnostic_outside_of_impl,
8
- rustc:: untranslatable_diagnostic,
8
+ rustc:: untranslatable_diagnostic
9
9
) ]
10
10
11
11
extern crate rustc_data_structures;
@@ -16,14 +16,14 @@ extern crate rustc_log;
16
16
extern crate rustc_metadata;
17
17
extern crate rustc_middle;
18
18
extern crate rustc_session;
19
+ #[ macro_use]
20
+ extern crate tracing;
19
21
20
22
use std:: env:: { self , VarError } ;
21
23
use std:: num:: NonZero ;
22
24
use std:: path:: PathBuf ;
23
25
use std:: str:: FromStr ;
24
26
25
- use log:: debug;
26
-
27
27
use rustc_data_structures:: sync:: Lrc ;
28
28
use rustc_driver:: Compilation ;
29
29
use rustc_hir:: { self as hir, Node } ;
@@ -200,7 +200,7 @@ fn rustc_logger_config() -> rustc_log::LoggerConfig {
200
200
// CTFE-related. Otherwise, we use it verbatim for `RUSTC_LOG`.
201
201
// This way, if you set `MIRI_LOG=trace`, you get only the right parts of
202
202
// 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 ( ) {
204
204
cfg. filter = Ok ( format ! (
205
205
"rustc_middle::mir::interpret={var},rustc_const_eval::interpret={var}"
206
206
) ) ;
@@ -218,10 +218,6 @@ fn rustc_logger_config() -> rustc_log::LoggerConfig {
218
218
}
219
219
220
220
fn 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) ;
225
221
// Now for rustc. We only initialize `rustc` if the env var is set (so the user asked for it).
226
222
// If it is not set, we avoid initializing now so that we can initialize later with our custom
227
223
// settings, and *not* log anything for what happens before `miri` gets started.
0 commit comments