Open tgross35 opened 1 year ago
I'm on the fence on this.
On the one hand I see the usefulness of the dbg!
macro for quick debugging. However I think these statement shouldn't be committed (i.e. they should be removed before sending the code upstream).
If you need more information in a way that the log
crate can provide I think it would be more beneficial to add proper debug!
message and use the release_max_level_info
(or similar) feature to remove them from release binary. (this will also safe you time the next time you're debugging a similar issue, speaking from experience)
The
std::dbg!()
macro is quite useful for quick debugging. I have stumbled across at least a handful of cases where whatever the logger is is more useful than stderr output - for example, when the logger is mapped to RTT or UART on embedded and there is no stderr available.So, my suggestion is to add
ldbg
that acts similarly to the debug macro, but uses the default logger.