Skip to content

Commit

Permalink
Make log level configurable from command line argument (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-a-tanjim authored Mar 10, 2024
1 parent 48e75c2 commit c38a54b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions images/keria.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Builder stage
FROM python:3.10.13-alpine3.18 as builder
FROM python:3.12-alpine3.19 as builder

# Install compilation dependencies
RUN apk --no-cache add \
Expand Down Expand Up @@ -29,7 +29,7 @@ RUN . "$HOME/.cargo/env" && \
pip install -r requirements.txt

# Runtime stage
FROM python:3.10.13-alpine3.18
FROM python:3.12-alpine3.19

# Install runtime dependencies
RUN apk --no-cache add \
Expand Down
4 changes: 3 additions & 1 deletion src/keria/app/cli/commands/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@
help="TLS server signed certificate (public key) file")
parser.add_argument("--cafilepath", action="store", required=False, default=None,
help="TLS server CA certificate chain")
parser.add_argument("--loglevel", action="store", required=False, default="CRITICAL",
help="Set log level to DEBUG | INFO | WARNING | ERROR | CRITICAL. Default is CRITICAL")


def launch(args):
help.ogler.level = logging.CRITICAL
help.ogler.level = logging.getLevelName(args.loglevel)
help.ogler.reopen(name=args.name, temp=True, clear=True)

logger = help.ogler.getLogger()
Expand Down

0 comments on commit c38a54b

Please sign in to comment.