summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-03-27 13:17:28 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-27 20:23:19 +0100
commit542eb4731cd491c23e30689e5c8c0da91ba4bb44 (patch)
tree6906500a86808bcc49a53b9c9f97401363172391 /bitbake
parent614cbeddc8f092bf2748ae7555d62467f3c45f16 (diff)
downloadpoky-542eb4731cd491c23e30689e5c8c0da91ba4bb44.tar.gz
bitbake: tinfoil: enable client-side logger handling by default
If you had a script that uses tinfoil and it failed to connect to the BitBake server, you did't see any of the expected messages - this was because client-side logging wasn't being handled at all. Since you'll almost always want this when using tinfoil, have it use the new bb.msg.logger_create() function to enable client-side logging by default. Relates to [YOCTO #11185]. (Bitbake rev: 824e73e0f3eaa96b4d84da7e31f9a17ce5c5d7ee) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/tinfoil.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 19b41be46c..c2ee707298 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -210,13 +210,17 @@ class TinfoilCookerAdapter:
210 210
211class Tinfoil: 211class Tinfoil:
212 212
213 def __init__(self, output=sys.stdout, tracking=False): 213 def __init__(self, output=sys.stdout, tracking=False, setup_logging=True):
214 self.logger = logging.getLogger('BitBake') 214 self.logger = logging.getLogger('BitBake')
215 self.config_data = None 215 self.config_data = None
216 self.cooker = None 216 self.cooker = None
217 self.tracking = tracking 217 self.tracking = tracking
218 self.ui_module = None 218 self.ui_module = None
219 self.server_connection = None 219 self.server_connection = None
220 if setup_logging:
221 # This is the *client-side* logger, nothing to do with
222 # logging messages from the server
223 bb.msg.logger_create('BitBake', output)
220 224
221 def __enter__(self): 225 def __enter__(self):
222 return self 226 return self