summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/tinfoil.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 1ea46d8eec..7aa653f1aa 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -36,13 +36,13 @@ class Tinfoil:
36 36
37 # Set up logging 37 # Set up logging
38 self.logger = logging.getLogger('BitBake') 38 self.logger = logging.getLogger('BitBake')
39 console = logging.StreamHandler(output) 39 self._log_hdlr = logging.StreamHandler(output)
40 bb.msg.addDefaultlogFilter(console) 40 bb.msg.addDefaultlogFilter(self._log_hdlr)
41 format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s") 41 format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
42 if output.isatty(): 42 if output.isatty():
43 format.enable_color() 43 format.enable_color()
44 console.setFormatter(format) 44 self._log_hdlr.setFormatter(format)
45 self.logger.addHandler(console) 45 self.logger.addHandler(self._log_hdlr)
46 46
47 self.config = CookerConfiguration() 47 self.config = CookerConfiguration()
48 configparams = TinfoilConfigParameters(parse_only=True) 48 configparams = TinfoilConfigParameters(parse_only=True)
@@ -88,6 +88,7 @@ class Tinfoil:
88 self.cooker.shutdown(force=True) 88 self.cooker.shutdown(force=True)
89 self.cooker.post_serve() 89 self.cooker.post_serve()
90 self.cooker.unlockBitbake() 90 self.cooker.unlockBitbake()
91 self.logger.removeHandler(self._log_hdlr)
91 92
92class TinfoilConfigParameters(ConfigParameters): 93class TinfoilConfigParameters(ConfigParameters):
93 94