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