Skip to content

Commit

Permalink
_cli: use rich's logging handler
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <william@trailofbits.com>
  • Loading branch information
woodruffw committed Dec 5, 2023
1 parent 9dc27b5 commit 4661479
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies = [
"pyjwt >= 2.1",
"pyOpenSSL >= 23.0.0",
"requests",
"rich ~= 13.0",
"securesystemslib",
"sigstore-protobuf-specs ~= 0.2.2",
"sigstore-rekor-types >= 0.0.11",
Expand Down
3 changes: 2 additions & 1 deletion sigstore/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from typing import NoReturn, Optional, TextIO, Union, cast

from cryptography.x509 import load_pem_x509_certificates
from rich.logging import RichHandler
from sigstore_protobuf_specs.dev.sigstore.bundle.v1 import Bundle

from sigstore import __version__
Expand Down Expand Up @@ -61,7 +62,7 @@
)
from sigstore.verify.models import VerificationFailure

logging.basicConfig()
logging.basicConfig(format="%(message)s", datefmt="[%X]", handlers=[RichHandler()])
logger = logging.getLogger(__name__)

# NOTE: We configure the top package logger, rather than the root logger,
Expand Down

0 comments on commit 4661479

Please sign in to comment.