-
-
Notifications
You must be signed in to change notification settings - Fork 75
Allow single line log output #407
Comments
Hi @ctron, thank you for your request. You can configure In your case you could write a small script which outputs the logs in your preffered way. Let me know what you think. |
Yea, I got that running, somewhat like this: env DEFMT_LOG=debug cargo run -- --json | jq -r '"\(.target_timestamp) \(.data)"' however, it would be nice to just do:
And maybe even configure that in the [target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "probe-run --chip STM32L432KCUx --format single" And have the colored output too. |
I get what you mean. My only concern is that the number of output formats people would like to have is potentially unbound. Therefore it would be cool if anyone could just plug in their favorite format and they do not all have to live in our repo. |
Indeed. On the other hand, supporting a "standard" log format like a wide use library (like env_logger) makes more sense IMHO than to force a (new) custom format on everyone. And ideally, it should be possible to stay with the tool/toolchain being used. Meaning: I can configure So I think there are two things which can be improved here:
I guess that 1. is a low hanging fruit which would already cover most of the cases. |
To me, probe-run is a highly opinionated tool that is aimed at people starting out in Embedded Rust and who want a batteries-included tool. I think the flexibility we have is probably sufficient for that audience and I don't think I'm convinced of the need to maintain two different textual log output formats. It is worth noting as well that you can create a shell-script wrapper (or another Rust program) which calls probe-run and parses the JSON output, then use that as your |
I agree with @jonathanpallant. Also note that there is the |
Describe the bug
Allow the user to choose a single-line output format.
To Reproduce
Use
probe-run
in combination with defmt.Expected and observed behavior
When I run something, I get the following output:
I find this hard to read and would prefer a format with a single line output, like this:
Or, some mix:
The text was updated successfully, but these errors were encountered: