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-20 18:00:34 +0000 |
commit | 62b825b19b13a914cbff5303d541bd5dbbec90a7 (patch) | |
tree | 8e20b8d31a3ede34b1f3f6014847958cbf186368 /bin/bitbake-layers | |
parent | 6e2f09b58882d3949026b9dd545f789ad3fe6fab (diff) | |
download | bitbake-contrib-62b825b19b13a914cbff5303d541bd5dbbec90a7.tar.gz |
bitbake-layers: fix logging
Logging output was simply not getting printed.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake-layers')
-rwxr-xr-x | bin/bitbake-layers | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/bitbake-layers b/bin/bitbake-layers index 2622bc092..fc62386b6 100755 --- a/bin/bitbake-layers +++ b/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(): |