From af031cb9496dbad5f56840a092b5cccbaf3f13ab Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Sat, 10 Dec 2022 19:18:02 +0100 Subject: [PATCH] allow giving log level as string --- slic/utils/logign.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slic/utils/logign.py b/slic/utils/logign.py index 3041fdc29..24fc665c8 100644 --- a/slic/utils/logign.py +++ b/slic/utils/logign.py @@ -40,7 +40,7 @@ class IgnoreMessagesFilter(logging.Filter): lvl = self.lvl msg = self.msg - is_lvl = (lvl is None or lvl == record.levelno) + is_lvl = (lvl is None or lvl == record.levelno or lvl.upper() == record.levelname) is_msg = (msg is None or msg == record.msg) return not (is_lvl and is_msg)