aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/tinfoil.py
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 11:10:37 +0100
commit824e73e0f3eaa96b4d84da7e31f9a17ce5c5d7ee (patch)
tree39314c6b2ac43b21eb9c6044529b765ddc6199cf /lib/bb/tinfoil.py
parentb1ba7d1cc8ec33e2d081230287abd07f52136097 (diff)
downloadbitbake-824e73e0f3eaa96b4d84da7e31f9a17ce5c5d7ee.tar.gz
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tinfoil.py')
-rw-r--r--lib/bb/tinfoil.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index 19b41be46..c2ee70729 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -210,13 +210,17 @@ class TinfoilCookerAdapter:
class Tinfoil:
- def __init__(self, output=sys.stdout, tracking=False):
+ def __init__(self, output=sys.stdout, tracking=False, setup_logging=True):
self.logger = logging.getLogger('BitBake')
self.config_data = None
self.cooker = None
self.tracking = tracking
self.ui_module = None
self.server_connection = None
+ if setup_logging:
+ # This is the *client-side* logger, nothing to do with
+ # logging messages from the server
+ bb.msg.logger_create('BitBake', output)
def __enter__(self):
return self