Skip to content

Commit 41b0ace

Browse files
RalfJunghawkw
authored andcommitted
subscriber: say which crate the disabled level warning refers to (#2285)
I just saw this warning when trying to debug something in Miri: ``` warning: some trace filter directives would enable traces that are disabled statically | `miri::tls=trace` would enable the TRACE level for the `miri::tls` target = note: the static max level is `info` = help: to enable DEBUG logging, remove the `max_level_info` feature ``` I spent 10min figuring out why the `log` crate is doing this (Miri is using env-logger for logging), until I realized that this error actually originates from inside rustc, which I guess uses `tracing`. It would have helped if the error message would say which crate is even talking to me here. :)
1 parent 760170b commit 41b0ace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tracing-subscriber/src/filter/env/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl Builder {
282282
};
283283
let (feature, earlier_level) = help_msg();
284284
ctx_help(&format!(
285-
"to enable {}logging, remove the `{}` feature",
285+
"to enable {}logging, remove the `{}` feature from the `tracing` crate",
286286
earlier_level, feature
287287
));
288288
}

0 commit comments

Comments
 (0)