Skip to content
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

_cli: refactor logging behavior #372

Merged
merged 4 commits into from
Dec 28, 2022
Merged

Conversation

woodruffw
Copy link
Member

This refactors sigstore's logging behavior to the following:

  1. SIGSTORE_LOGLEVEL now only affects the sigstore.* logger hierarchy
  2. -v is added as an additive option;
    1. -v corresponds to SIGSTORE_LOGLEVEL=debug
    2. -vv corresponds to <root logger>.setLevel("DEBUG")

cc @jku

Closes #371.

Signed-off-by: William Woodruff william@trailofbits.com

Closes #371.

Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw woodruffw added component:cli CLI components refactoring Refactoring tasks. labels Dec 27, 2022
@woodruffw woodruffw self-assigned this Dec 27, 2022
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
woodruffw added a commit to pypa/pip-audit that referenced this pull request Dec 27, 2022
This is inspired by the refactor in
sigstore/sigstore-python#372.

Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
Copy link
Collaborator

@tetsuo-cpp tetsuo-cpp left a comment

Choose a reason for hiding this comment

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

LGTM!

@tetsuo-cpp tetsuo-cpp merged commit f0ffcba into main Dec 28, 2022
@tetsuo-cpp tetsuo-cpp deleted the ww/better-logging-defaults branch December 28, 2022 00:54
tetsuo-cpp pushed a commit to pypa/pip-audit that referenced this pull request Dec 28, 2022
* _cli: refactor logging

This is inspired by the refactor in
sigstore/sigstore-python#372.

Signed-off-by: William Woodruff <william@trailofbits.com>

* README: update `pip-audit --help`

Signed-off-by: William Woodruff <william@trailofbits.com>

Signed-off-by: William Woodruff <william@trailofbits.com>
woodruffw added a commit to pypa/pip-audit that referenced this pull request Dec 28, 2022
* _cli: refactor logging

This is inspired by the refactor in
sigstore/sigstore-python#372.

Signed-off-by: William Woodruff <william@trailofbits.com>

* README: update `pip-audit --help`

Signed-off-by: William Woodruff <william@trailofbits.com>

Signed-off-by: William Woodruff <william@trailofbits.com>
woodruffw added a commit to pypa/pip-audit that referenced this pull request Dec 29, 2022
* pip_audit, test: warn on Python path confusion

Closes #450.

Signed-off-by: William Woodruff <william@trailofbits.com>

* pip_audit, test: refactor check to use VIRTUAL_ENV

Signed-off-by: William Woodruff <william@trailofbits.com>

* pip_audit: remove commented code

Signed-off-by: William Woodruff <william@trailofbits.com>

* pip_audit, test: lintage

Signed-off-by: William Woodruff <william@trailofbits.com>

* CHANGELOG: record changes

Signed-off-by: William Woodruff <william@trailofbits.com>

* _cache: Remove remaining "Warning" prefix in log line

* _cli: refactor logging (#452)

* _cli: refactor logging

This is inspired by the refactor in
sigstore/sigstore-python#372.

Signed-off-by: William Woodruff <william@trailofbits.com>

* README: update `pip-audit --help`

Signed-off-by: William Woodruff <william@trailofbits.com>

Signed-off-by: William Woodruff <william@trailofbits.com>

* treewide: prep 2.4.11 (#453)

Signed-off-by: William Woodruff <william@trailofbits.com>
Co-authored-by: Alex Cameron <asc@tetsuo.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cli CLI components refactoring Refactoring tasks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-think logging
2 participants