diff options
-rw-r--r-- | bitbake/lib/bb/msg.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py index 9d26fa06bd..1f9ff904af 100644 --- a/bitbake/lib/bb/msg.py +++ b/bitbake/lib/bb/msg.py | |||
@@ -33,6 +33,8 @@ import bb.event | |||
33 | class BBLogFormatter(logging.Formatter): | 33 | class BBLogFormatter(logging.Formatter): |
34 | """Formatter which ensures that our 'plain' messages (logging.INFO + 1) are used as is""" | 34 | """Formatter which ensures that our 'plain' messages (logging.INFO + 1) are used as is""" |
35 | 35 | ||
36 | DEBUG3 = logging.DEBUG - 2 | ||
37 | DEBUG2 = logging.DEBUG - 1 | ||
36 | DEBUG = logging.DEBUG | 38 | DEBUG = logging.DEBUG |
37 | VERBOSE = logging.INFO - 1 | 39 | VERBOSE = logging.INFO - 1 |
38 | NOTE = logging.INFO | 40 | NOTE = logging.INFO |
@@ -42,10 +44,12 @@ class BBLogFormatter(logging.Formatter): | |||
42 | CRITICAL = logging.CRITICAL | 44 | CRITICAL = logging.CRITICAL |
43 | 45 | ||
44 | levelnames = { | 46 | levelnames = { |
47 | DEBUG3 : 'DEBUG', | ||
48 | DEBUG2 : 'DEBUG', | ||
45 | DEBUG : 'DEBUG', | 49 | DEBUG : 'DEBUG', |
46 | PLAIN : '', | ||
47 | NOTE : 'NOTE', | ||
48 | VERBOSE: 'NOTE', | 50 | VERBOSE: 'NOTE', |
51 | NOTE : 'NOTE', | ||
52 | PLAIN : '', | ||
49 | WARNING : 'WARNING', | 53 | WARNING : 'WARNING', |
50 | ERROR : 'ERROR', | 54 | ERROR : 'ERROR', |
51 | CRITICAL: 'ERROR', | 55 | CRITICAL: 'ERROR', |
@@ -60,7 +64,7 @@ class BBLogFormatter(logging.Formatter): | |||
60 | 64 | ||
61 | def format(self, record): | 65 | def format(self, record): |
62 | record.levelname = self.getLevelName(record.levelno) | 66 | record.levelname = self.getLevelName(record.levelno) |
63 | if record.levelno == logging.INFO + 1: | 67 | if record.levelno == self.PLAIN: |
64 | return record.getMessage() | 68 | return record.getMessage() |
65 | else: | 69 | else: |
66 | return logging.Formatter.format(self, record) | 70 | return logging.Formatter.format(self, record) |
@@ -123,9 +127,9 @@ def get_debug_level(msgdomain = domain.Default): | |||
123 | 127 | ||
124 | def set_verbose(level): | 128 | def set_verbose(level): |
125 | if level: | 129 | if level: |
126 | logger.setLevel(logging.INFO - 1) | 130 | logger.setLevel(BBLogFormatter.VERBOSE) |
127 | else: | 131 | else: |
128 | logger.setLevel(logging.INFO) | 132 | logger.setLevel(BBLogFormatter.INFO) |
129 | 133 | ||
130 | def set_debug_domains(domainargs): | 134 | def set_debug_domains(domainargs): |
131 | for (domainarg, iterator) in groupby(domainargs): | 135 | for (domainarg, iterator) in groupby(domainargs): |