Skip to content

Commit

Permalink
subscriber: say which crate the disabled level warning refers to (#2285)
Browse files Browse the repository at this point in the history
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. :)
  • Loading branch information
RalfJung authored and hawkw committed Sep 19, 2022
1 parent 760170b commit 41b0ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tracing-subscriber/src/filter/env/builder.rs
Expand Up @@ -282,7 +282,7 @@ impl Builder {
};
let (feature, earlier_level) = help_msg();
ctx_help(&format!(
"to enable {}logging, remove the `{}` feature",
"to enable {}logging, remove the `{}` feature from the `tracing` crate",
earlier_level, feature
));
}
Expand Down

0 comments on commit 41b0ace

Please sign in to comment.