Skip to content

feat: Add -v/--verbose flag and migrate to log crate#296

Open
febyeji wants to merge 3 commits intopulp-platform:masterfrom
febyeji:feat/verbose-log
Open

feat: Add -v/--verbose flag and migrate to log crate#296
febyeji wants to merge 3 commits intopulp-platform:masterfrom
febyeji:feat/verbose-log

Conversation

@febyeji
Copy link
Copy Markdown
Contributor

@febyeji febyeji commented Mar 30, 2026

Summary

  • Add -v/--verbose global flag with multi-level verbosity (-v info, -vv debug, -vvv trace) using log + env_logger
  • Also configurable via BENDER_VERBOSE env var
  • Migrate all debugln! macro calls to log::debug! and remove the old debug infrastructure (ENABLE_DEBUG, --debug flag)
  • Automatically disable progress bars when verbose output is active'

Closes #277

febyeji and others added 2 commits March 30, 2026 21:51
- 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.
Copy link
Copy Markdown
Contributor

@fischeti fischeti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@febyeji
Copy link
Copy Markdown
Contributor Author

febyeji commented Mar 31, 2026

Thank you for the review! I've applied your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] bender checkout -v and bender update -v

2 participants