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 [email protected]

Closes #371.

Signed-off-by: William Woodruff <[email protected]>
@woodruffw woodruffw added component:cli CLI components refactoring Refactoring tasks. labels Dec 27, 2022
@woodruffw woodruffw requested review from di and tetsuo-cpp December 27, 2022 17:57
@woodruffw woodruffw self-assigned this Dec 27, 2022
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
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 <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Copy link
Contributor

@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 <[email protected]>

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

Signed-off-by: William Woodruff <[email protected]>

Signed-off-by: William Woodruff <[email protected]>
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 <[email protected]>

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

Signed-off-by: William Woodruff <[email protected]>

Signed-off-by: William Woodruff <[email protected]>
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 <[email protected]>

* pip_audit, test: refactor check to use VIRTUAL_ENV

Signed-off-by: William Woodruff <[email protected]>

* pip_audit: remove commented code

Signed-off-by: William Woodruff <[email protected]>

* pip_audit, test: lintage

Signed-off-by: William Woodruff <[email protected]>

* CHANGELOG: record changes

Signed-off-by: William Woodruff <[email protected]>

* _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 <[email protected]>

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

Signed-off-by: William Woodruff <[email protected]>

Signed-off-by: William Woodruff <[email protected]>

* treewide: prep 2.4.11 (#453)

Signed-off-by: William Woodruff <[email protected]>
Co-authored-by: Alex Cameron <[email protected]>
timothy-bartlett added a commit to timothy-bartlett/pip-audit that referenced this pull request Aug 22, 2024
* _cli: refactor logging

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

Signed-off-by: William Woodruff <[email protected]>

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

Signed-off-by: William Woodruff <[email protected]>

Signed-off-by: William Woodruff <[email protected]>
timothy-bartlett added a commit to timothy-bartlett/pip-audit that referenced this pull request Aug 22, 2024
* pip_audit, test: warn on Python path confusion

Closes #450.

Signed-off-by: William Woodruff <[email protected]>

* pip_audit, test: refactor check to use VIRTUAL_ENV

Signed-off-by: William Woodruff <[email protected]>

* pip_audit: remove commented code

Signed-off-by: William Woodruff <[email protected]>

* pip_audit, test: lintage

Signed-off-by: William Woodruff <[email protected]>

* CHANGELOG: record changes

Signed-off-by: William Woodruff <[email protected]>

* _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 <[email protected]>

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

Signed-off-by: William Woodruff <[email protected]>

Signed-off-by: William Woodruff <[email protected]>

* treewide: prep 2.4.11 (#453)

Signed-off-by: William Woodruff <[email protected]>
Co-authored-by: Alex Cameron <[email protected]>
timothy-bartlett added a commit to timothy-bartlett/pip-audit that referenced this pull request Aug 22, 2024
* _cli: refactor logging

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

Signed-off-by: William Woodruff <[email protected]>

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

Signed-off-by: William Woodruff <[email protected]>

Signed-off-by: William Woodruff <[email protected]>
timothy-bartlett added a commit to timothy-bartlett/pip-audit that referenced this pull request Aug 22, 2024
* pip_audit, test: warn on Python path confusion

Closes #450.

Signed-off-by: William Woodruff <[email protected]>

* pip_audit, test: refactor check to use VIRTUAL_ENV

Signed-off-by: William Woodruff <[email protected]>

* pip_audit: remove commented code

Signed-off-by: William Woodruff <[email protected]>

* pip_audit, test: lintage

Signed-off-by: William Woodruff <[email protected]>

* CHANGELOG: record changes

Signed-off-by: William Woodruff <[email protected]>

* _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 <[email protected]>

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

Signed-off-by: William Woodruff <[email protected]>

Signed-off-by: William Woodruff <[email protected]>

* treewide: prep 2.4.11 (#453)

Signed-off-by: William Woodruff <[email protected]>
Co-authored-by: Alex Cameron <[email protected]>
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