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

Re-think logging #371

Closed
woodruffw opened this issue Dec 27, 2022 · 0 comments · Fixed by #372
Closed

Re-think logging #371

woodruffw opened this issue Dec 27, 2022 · 0 comments · Fixed by #372
Labels
enhancement New feature or request refactoring Refactoring tasks.

Comments

@woodruffw
Copy link
Member

Per discussion in theupdateframework/python-tuf#2243: our logging behavior is currently as follows:

  1. By default, we emit INFO and higher logs
  2. We respect SIGSTORE_LOGLEVEL to set the root logger, e.g. SIGSTORE_LOGLEVEL=debug sets DEBUG for all loggers, not just first-party ones.

(2) is arguably incorrect -- SIGSTORE_LOGLEVEL should probably only affect loggers under the sigstore logging hierarchy, not the entire runtime.

Additionally, we should probably support a -v/--verbose flag with additive functionality:

  1. -v: equivalent to DEBUG for first-party code (i.e. sigstore.*)
  2. -vv: equivalent to DEBUG for all code (i.e. DEBUG on the root logger)

cc @jku

@woodruffw woodruffw added enhancement New feature or request refactoring Refactoring tasks. labels Dec 27, 2022
woodruffw added a commit that referenced this issue Dec 27, 2022
Closes #371.

Signed-off-by: William Woodruff <william@trailofbits.com>
tetsuo-cpp pushed a commit that referenced this issue Dec 28, 2022
* _cli: refactor logging behavior

Closes #371.

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

* CHANGELOG: record changes

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

* README: update `sigstore --help`

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

* _cli: fold `level` variable

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

Signed-off-by: William Woodruff <william@trailofbits.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Refactoring tasks.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant