diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/msg.py | 7 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py index 90b158238f..f1723be797 100644 --- a/bitbake/lib/bb/msg.py +++ b/bitbake/lib/bb/msg.py | |||
@@ -216,3 +216,10 @@ def logger_create(name, output=sys.stderr, level=logging.INFO, preserve_handlers | |||
216 | logger.handlers = [console] | 216 | logger.handlers = [console] |
217 | logger.setLevel(level) | 217 | logger.setLevel(level) |
218 | return logger | 218 | return logger |
219 | |||
220 | def has_console_handler(logger): | ||
221 | for handler in logger.handlers: | ||
222 | if isinstance(handler, logging.StreamHandler): | ||
223 | if handler.stream in [sys.stderr, sys.stdout]: | ||
224 | return True | ||
225 | return False | ||
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 82aa7c4644..a19c3b3ba5 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
@@ -365,8 +365,9 @@ def main(server, eventHandler, params, tf = TerminalFilter): | |||
365 | bb.msg.addDefaultlogFilter(errconsole, bb.msg.BBLogFilterStdErr) | 365 | bb.msg.addDefaultlogFilter(errconsole, bb.msg.BBLogFilterStdErr) |
366 | console.setFormatter(format) | 366 | console.setFormatter(format) |
367 | errconsole.setFormatter(format) | 367 | errconsole.setFormatter(format) |
368 | logger.addHandler(console) | 368 | if not bb.msg.has_console_handler(logger): |
369 | logger.addHandler(errconsole) | 369 | logger.addHandler(console) |
370 | logger.addHandler(errconsole) | ||
370 | 371 | ||
371 | bb.utils.set_process_name("KnottyUI") | 372 | bb.utils.set_process_name("KnottyUI") |
372 | 373 | ||