Default to ERROR logging level if the supplied logging level is invalid

This commit is contained in:
Andrew Resch 2009-01-18 06:24:49 +00:00
parent 40ba6ea2ba
commit 58361f4af2
1 changed files with 1 additions and 1 deletions

View File

@ -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(