From da31628d863631fe44a4ace850e8d90f6cd6e431 Mon Sep 17 00:00:00 2001 From: Christopher Arndt Date: Sun, 23 Jul 2023 18:02:03 +0200 Subject: [PATCH] feat: log level from environment is recognised case-insensitively Signed-off-by: Christopher Arndt --- matrixchat-notify.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/matrixchat-notify.py b/matrixchat-notify.py index 54fc5b9..6c30f0a 100755 --- a/matrixchat-notify.py +++ b/matrixchat-notify.py @@ -141,9 +141,7 @@ def main(args=None): args = ap.parse_args(args) logging.basicConfig( - level=getattr( - logging, "DEBUG" if args.verbose else os.environ.get("PLUGIN_LOG_LEVEL", "INFO") - ), + level="DEBUG" if args.verbose else os.environ.get("PLUGIN_LOG_LEVEL", "INFO").upper(), format=os.environ.get("PLUGIN_LOG_FORMAT", "%(levelname)s: %(message)s"), )