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 | |
parent | 4a32837971100fdaf62a544ba9fc651837a6dbcc (diff) | |
download | openembedded-core-contrib-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')
-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 import bb.tinfoil -logger = logging.getLogger('BitBake') - +def logger_create(name, output=sys.stderr): + logger = logging.getLogger(name) + console = logging.StreamHandler(output) + format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s") + if output.isatty(): + format.enable_color() + console.setFormatter(format) + logger.addHandler(console) + logger.setLevel(logging.INFO) + return logger + +logger = logger_create('bitbake-layers') class Commands(): |