Skip to content

Commit 79eed33

Browse files
committed
Always register a tracing subscriber, even if no env var is set
1 parent ca8078d commit 79eed33

File tree

1 file changed

+0
-6
lines changed
  • compiler/rustc_driver/src

1 file changed

+0
-6
lines changed

compiler/rustc_driver/src/lib.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1253,12 +1253,6 @@ pub fn init_rustc_env_logger() {
12531253
/// tracing crate version. In contrast to `init_rustc_env_logger` it allows you to choose an env var
12541254
/// other than `RUSTC_LOG`.
12551255
pub fn init_env_logger(env: &str) {
1256-
// Don't register a dispatcher if there's no filter to print anything
1257-
match std::env::var(env) {
1258-
Err(_) => return,
1259-
Ok(s) if s.is_empty() => return,
1260-
Ok(_) => {}
1261-
}
12621256
let color_logs = match std::env::var(String::from(env) + "_COLOR") {
12631257
Ok(value) => match value.as_ref() {
12641258
"always" => true,

0 commit comments

Comments
 (0)