Skip to content

Commit

Permalink
Merge pull request #3 from provenant-dev/config-log-level
Browse files Browse the repository at this point in the history
Make log level configurable from command line argument
  • Loading branch information
dhh1128 authored Feb 19, 2024
2 parents b96189b + 6a165e0 commit 1cce712
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/keri/app/cli/commands/witness/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
parser.add_argument("--keypath", action="store", required=False, default=None)
parser.add_argument("--certpath", action="store", required=False, default=None)
parser.add_argument("--cafilepath", action="store", required=False, default=None)
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.INFO
help.ogler.level = logging.getLevelName(args.loglevel)
help.ogler.reopen(name=args.name, temp=True, clear=True) # need to configure for logging persistent file

logger = help.ogler.getLogger()
Expand Down

0 comments on commit 1cce712

Please sign in to comment.