]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/msg.py: Add named definitions for all logging levels
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 7 Jan 2011 23:50:17 +0000 (23:50 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Jan 2011 00:01:59 +0000 (00:01 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/msg.py

index 13ee569e9a47886ada23719c32190e62ce118a74..00dc139c88d8f9f46929837e7f45ef1a32204d98 100644 (file)
@@ -33,17 +33,22 @@ import bb.event
 class BBLogFormatter(logging.Formatter):
     """Formatter which ensures that our 'plain' messages (logging.INFO + 1) are used as is"""
 
+    DEBUG = logging.DEBUG
     VERBOSE = 19
+    NOTE = logging.INFO
     PLAIN = 21
+    ERROR = logging.ERROR
+    WARNING = logging.WARNING
+    CRITICAL = logging.CRITICAL
+
     levelnames = {
+        DEBUG   : 'DEBUG',
         PLAIN  : '',
+        NOTE    : 'NOTE',
         VERBOSE: 'NOTE',
-
-        logging.DEBUG   : 'DEBUG',
-        logging.INFO    : 'NOTE',
-        logging.WARNING : 'WARNING',
-        logging.ERROR   : 'ERROR',
-        logging.CRITICAL: 'ERROR',
+        WARNING : 'WARNING',
+        ERROR   : 'ERROR',
+        CRITICAL: 'ERROR',
     }
 
     def getLevelName(self, levelno):