Default to ERROR logging level if the supplied logging level is invalid
This commit is contained in:
parent
5672db086a
commit
b7f9fec075
@ -43,7 +43,7 @@ def setupLogger(level="error", filename=None):
|
|||||||
:param filename: str, the file to log to
|
:param filename: str, the file to log to
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not level:
|
if not level or level not in levels:
|
||||||
level = "error"
|
level = "error"
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user