feat: Add -v/--verbose flag and migrate to log crate#296
Open
febyeji wants to merge 3 commits intopulp-platform:masterfrom
Open
feat: Add -v/--verbose flag and migrate to log crate#296febyeji wants to merge 3 commits intopulp-platform:masterfrom
febyeji wants to merge 3 commits intopulp-platform:masterfrom
Conversation
- Add `log` and `env_logger` crates - Add `-v` global flag (-v info, -vv debug, -vvv trace) - Log git commands, fetch decisions, checkout operations - Support `BENDER_VERBOSE` environment variable - Auto-disable progress bars when verbose is enabled Closes pulp-platform#277
Migrate all `debugln!` calls to `log::debug!` and remove the old debug infrastructure (`ENABLE_DEBUG`, `--debug` flag, and `debugln!` macro definitions). Debug output is now controlled via the `-v/-vv/-vvv` verbosity levels introduced in the previous commit.
595f557 to
6237eb5
Compare
fischeti
reviewed
Mar 30, 2026
Contributor
fischeti
left a comment
There was a problem hiding this comment.
Thanks a lot for implementing this. I tried it and it looks nice. I just have some minor comments
src/cli.rs
Outdated
Comment on lines
+75
to
+76
| /// Increase logging verbosity (-v info, -vv debug, -vvv trace). Disables progress bars. | ||
| /// Set BENDER_VERBOSE to a number (e.g. BENDER_VERBOSE=2) for -vv equivalent. |
Contributor
There was a problem hiding this comment.
The help message is a bit too long i.e. it wraps weirdly in the help pages. Potentially, you can also try out long_help below, which I believe should wrap the help message in a smarter way
- Simplify `short = 'v'` to `short` (inferred from field name) - Split verbose help into short help and long_help - Remove unused `humantime` feature from env_logger
Contributor
Author
|
Thank you for the review! I've applied your feedback. |
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.
Summary
-v/--verboseglobal flag with multi-level verbosity (-vinfo,-vvdebug,-vvvtrace) usinglog+env_loggerBENDER_VERBOSEenv vardebugln!macro calls tolog::debug!and remove the old debug infrastructure (ENABLE_DEBUG,--debugflag)Closes #277