diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-02-20 17:52:42 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-21 22:05:37 +0000 |
commit | 90ffdc01ba2d75b171720baa4232f6cc1ae8b0b1 (patch) | |
tree | b3b87a4e9f2b9b7f98298571e71f45b0aebd9e0c /bitbake/bin/bitbake-layers | |
parent | 4a32837971100fdaf62a544ba9fc651837a6dbcc (diff) | |
download | poky-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>
Diffstat (limited to 'bitbake/bin/bitbake-layers')
-rwxr-xr-x | bitbake/bin/bitbake-layers | 14 |
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 | |||
39 | import bb.tinfoil | 39 | import bb.tinfoil |
40 | 40 | ||
41 | 41 | ||
42 | logger = logging.getLogger('BitBake') | 42 | def 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 | |||
53 | logger = logger_create('bitbake-layers') | ||
44 | 54 | ||
45 | 55 | ||
46 | class Commands(): | 56 | class Commands(): |