Reduce logging level from debug to trace#8
Open
vvv wants to merge 2 commits intoIdein:masterfrom
Open
Conversation
Rationale: consider an app that periodically checks if the CPU is throttled. The developer of that app may want run it with `RUST_LOG=debug`. They would be surprised and annoyed if their logs were flooded with messages they don't care about. Check out this [convention](https://stackoverflow.com/a/2031209/136238) of logging levels. Example of noise: ``` 001_382ms DEBUG rpi_mailbox::kernel: buf_size: 4 001_491ms DEBUG rpi_mailbox::kernel: 4,4,16 001_493ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_495ms DEBUG rpi_mailbox::kernel: 28:16 001_495ms DEBUG rpi_mailbox::kernel: buf: [28, 0, 196678, 4, 4, 0, 0] 001_497ms DEBUG rpi_mailbox::kernel: buf: [28, 2147483648, 196678, 4, 2147483652, 983040, 0] 001_497ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_498ms DEBUG rpi_mailbox::kernel: req_resp_size: 4,4 001_498ms DEBUG rpi_mailbox::kernel: buf_size: 4 001_608ms DEBUG rpi_mailbox::kernel: 4,4,16 001_611ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_611ms DEBUG rpi_mailbox::kernel: 28:16 001_611ms DEBUG rpi_mailbox::kernel: buf: [28, 0, 196678, 4, 4, 0, 0] 001_614ms DEBUG rpi_mailbox::kernel: buf: [28, 2147483648, 196678, 4, 2147483652, 983040, 0] 001_615ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_615ms DEBUG rpi_mailbox::kernel: req_resp_size: 4,4 001_615ms DEBUG rpi_mailbox::kernel: buf_size: 4 001_726ms DEBUG rpi_mailbox::kernel: 4,4,16 001_728ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_728ms DEBUG rpi_mailbox::kernel: 28:16 001_728ms DEBUG rpi_mailbox::kernel: buf: [28, 0, 196678, 4, 4, 0, 0] 001_729ms DEBUG rpi_mailbox::kernel: buf: [28, 2147483648, 196678, 4, 2147483652, 983040, 0] 001_730ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_730ms DEBUG rpi_mailbox::kernel: req_resp_size: 4,4 001_730ms DEBUG rpi_mailbox::kernel: buf_size: 4 001_840ms DEBUG rpi_mailbox::kernel: 4,4,16 001_841ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_841ms DEBUG rpi_mailbox::kernel: 28:16 001_842ms DEBUG rpi_mailbox::kernel: buf: [28, 0, 196678, 4, 4, 0, 0] 001_844ms DEBUG rpi_mailbox::kernel: buf: [28, 2147483648, 196678, 4, 2147483652, 983040, 0] 001_844ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_844ms DEBUG rpi_mailbox::kernel: req_resp_size: 4,4 001_844ms DEBUG rpi_mailbox::kernel: buf_size: 4 001_955ms DEBUG rpi_mailbox::kernel: 4,4,16 001_956ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_956ms DEBUG rpi_mailbox::kernel: 28:16 001_957ms DEBUG rpi_mailbox::kernel: buf: [28, 0, 196678, 4, 4, 0, 0] 001_958ms DEBUG rpi_mailbox::kernel: buf: [28, 2147483648, 196678, 4, 2147483652, 983040, 0] 001_958ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 001_959ms DEBUG rpi_mailbox::kernel: req_resp_size: 4,4 001_959ms DEBUG rpi_mailbox::kernel: buf_size: 4 002_068ms DEBUG rpi_mailbox::kernel: 4,4,16 002_070ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 002_070ms DEBUG rpi_mailbox::kernel: 28:16 002_070ms DEBUG rpi_mailbox::kernel: buf: [28, 0, 196678, 4, 4, 0, 0] 002_073ms DEBUG rpi_mailbox::kernel: buf: [28, 2147483648, 196678, 4, 2147483652, 983040, 0] 002_073ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 002_073ms DEBUG rpi_mailbox::kernel: req_resp_size: 4,4 002_073ms DEBUG rpi_mailbox::kernel: buf_size: 4 002_182ms DEBUG rpi_mailbox::kernel: 4,4,16 002_184ms DEBUG rpi_mailbox::kernel: data[..] 70 0 3 0 ```
vvv
commented
Jul 4, 2025
| edition = "2021" | ||
| name = "rpi-mailbox" | ||
| version = "0.4.0" | ||
| version = "0.4.1" |
Author
There was a problem hiding this comment.
Please don't forget to tag v0.4.1 and push the new tag to origin after merging this PR.
It might be a good idea to tag v0.4.0 as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale: consider an app that periodically checks if the CPU is throttled. The developer of that app may want run it with
RUST_LOG=debug. They would be surprised and annoyed if their logs were flooded with messages irrelevant to their particular debugging need.Check out this convention of logging levels.
Example of noise: