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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SKIP SOF-TEST] capture-test: Add buffer size control & verbose logging #1207
base: main
Are you sure you want to change the base?
[SKIP SOF-TEST] capture-test: Add buffer size control & verbose logging #1207
Changes from 3 commits
a4191f3
e09defe
1a864ad
f717aa3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you will likely reply "overkill!" but this really smells like a missed
import logging
opportunity. People often overstate the complexity of Python's built-inlogging
, for a counter example see how little codelogging
required in recent commit 5419b42Also, something resistant to change something :-D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logging puts ugly prefix nonsense on the output lines, which IMHO is exactly what you don't want for human readable --verbose output. For a running system with multiple levels and the expectation of an engineer pouring through logs to intuit state? Sure. Here, for a --verbose flag? That's just not the way unix tools are expected to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it does not. As seen in 5419b42
And that's all it takes.
Python is a high level language. This means complicated things are possible, but simple things are easy: it's not because
logging
has 5 levels that you have to use them. You can just use two: verbose and not. Same for prefixes, multiple loggers and what not: they can be completely ignored.What
logging
gives even when not using any complex/fancy feature:if opt.verbose
conditionals and indentationif opt.verbose
conditionals and indentation.Don't get me wrong: I do NOT think this PR should be blocked on switching to
logging
. I only want to thank you for confirming thatlogging
's complexity is generally overstated and misunderstood :-)Maybe its documentation is missing the example above...