File tree 1 file changed +3
-9
lines changed
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 14
14
//!
15
15
//! ```
16
16
//! fn main() {
17
- //! rustc_log::init_rustc_env_logger( ).unwrap();
17
+ //! rustc_log::init_env_logger("LOG" ).unwrap();
18
18
//!
19
19
//! let edition = rustc_span::edition::Edition::Edition2021;
20
20
//! rustc_span::create_session_globals_then(edition, || {
23
23
//! }
24
24
//! ```
25
25
//!
26
- //! Now `RUSTC_LOG =debug cargo run` will run your minimal main.rs and show
26
+ //! Now `LOG =debug cargo run` will run your minimal main.rs and show
27
27
//! rustc's debug logging. In a workflow like this, one might also add
28
- //! `std::env::set_var("RUSTC_LOG ", "debug")` to the top of main so that `cargo
28
+ //! `std::env::set_var("LOG ", "debug")` to the top of main so that `cargo
29
29
//! run` by itself is sufficient to get logs.
30
30
//!
31
31
//! The reason rustc_log is a tiny separate crate, as opposed to exposing the
@@ -53,12 +53,6 @@ use tracing_subscriber::fmt::{
53
53
} ;
54
54
use tracing_subscriber:: layer:: SubscriberExt ;
55
55
56
- pub fn init_rustc_env_logger ( ) -> Result < ( ) , Error > {
57
- init_env_logger ( "RUSTC_LOG" )
58
- }
59
-
60
- /// In contrast to `init_rustc_env_logger` this allows you to choose an env var
61
- /// other than `RUSTC_LOG`.
62
56
pub fn init_env_logger ( env : & str ) -> Result < ( ) , Error > {
63
57
let filter = match env:: var ( env) {
64
58
Ok ( env) => EnvFilter :: new ( env) ,
You can’t perform that action at this time.
0 commit comments