Include our custom lower log levels into python's logging.

This commit is contained in:
Pedro Algarvio 2011-05-17 02:45:53 +01:00
parent 6391970fad
commit 9a3bf35cdf
1 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,8 @@ def setupLogger(level="error", filename=None, filemode="w"):
if logging.getLoggerClass() is not Logging: if logging.getLoggerClass() is not Logging:
logging.setLoggerClass(Logging) logging.setLoggerClass(Logging)
logging.addLevelName(5, 'TRACE')
logging.addLevelName(1, 'GARBAGE')
level = levels.get(level, logging.ERROR) level = levels.get(level, logging.ERROR)