summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-02-20 17:52:42 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-21 22:05:37 +0000
commit90ffdc01ba2d75b171720baa4232f6cc1ae8b0b1 (patch)
treeb3b87a4e9f2b9b7f98298571e71f45b0aebd9e0c
parent4a32837971100fdaf62a544ba9fc651837a6dbcc (diff)
downloadpoky-90ffdc01ba2d75b171720baa4232f6cc1ae8b0b1.tar.gz
bitbake: bitbake-layers: fix logging
Logging output was simply not getting printed. (Bitbake rev: 62b825b19b13a914cbff5303d541bd5dbbec90a7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/bin/bitbake-layers14
1 files changed, 12 insertions, 2 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 2622bc0927..fc62386b64 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -39,8 +39,18 @@ import bb.utils
39import bb.tinfoil 39import bb.tinfoil
40 40
41 41
42logger = logging.getLogger('BitBake') 42def logger_create(name, output=sys.stderr):
43 43 logger = logging.getLogger(name)
44 console = logging.StreamHandler(output)
45 format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
46 if output.isatty():
47 format.enable_color()
48 console.setFormatter(format)
49 logger.addHandler(console)
50 logger.setLevel(logging.INFO)
51 return logger
52
53logger = logger_create('bitbake-layers')
44 54
45 55
46class Commands(): 56class Commands():