allow giving log level as string

This commit is contained in:
2022-12-10 19:18:02 +01:00
parent 412c118c77
commit af031cb949
+1 -1
View File
@@ -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)