knurling-rs / probe-run

Run embedded programs just like native ones
Apache License 2.0
645 stars 75 forks source link

println! unexpectedly prints the statement's location before the formatted string #412

Open whitequark opened 1 year ago

whitequark commented 1 year ago

I was looking for a way to get my debug output to align into unbroken tables. Initially I wondered if it's possible to put the log output on a single line, but in https://github.com/knurling-rs/probe-run/issues/407 it is argued that the need to add a second textual log format is not convincingly present, so I guess that's not happening.

Since it is not in println!'s contract that it prints a bunch of random text in addition to the formatted string, and the proposal in #407 that would be an imperfect but functional workaround is rejected, I think there needs to be an option to disable log message headers for println!.

(I'm not exactly starting out with embedded Rust, but I'm picking up the modern tool stack, and this is probably the no.1 issue that bothers me on a daily basis.)