Open djc opened 3 years ago
I can confirm I'm seeing the same thing, but I am not using with_target(false)
:
Apr 30 08:41:29.138 INFOconsole: message from print_info, some_field: 43
at cheburashka/examples/cli.rs:19
Apr 30 08:41:29.138 WARNconsole: message from print_warn, some_field: 44
at cheburashka/examples/cli.rs:20
Apr 30 08:41:29.138 ERRORconsole: message from print_error, some_field: 45
at cheburashka/examples/cli.rs:21
(in the above output, console
is the target).
Also using tracing-subscriber 0.2.17
Can also confirm the same with the following minimal program:
// main.rs
fn main() {
tracing_subscriber::FmtSubscriber::builder().pretty().init();
tracing::info!("Some output");
}
tracing-subscriber = "0.2.18"
tracing = "0.1.26"
Edit: forgot output:
Jun 19 22:45:48.183 INFOtesting: Some output
at src/main.rs:3
Looks like this is a duplicate of #1309
BTW, until the fix gets backported, I managed to "fix" the issue by telling the pretty formatter to not output source location:
use tracing_subscriber::fmt::format::Pretty;
fn main() {
let formatter = Pretty::default().with_source_location(false);
tracing_subscriber::fmt().fmt_fields(formatter).init();
tracing::info!("Some output");
}
Bug Report
Version
tracing: 0.1.25 tracing-subscriber: 0.2.17
Platform
macOS Big Sur
Description
If I set up the tracing subscriber like this:
I get out put like this:
The lack of a space between the level and the event message seems like an oversight (perhaps related to disabling the target).