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>
This commit is contained in:
Paul Eggleton 2015-02-20 17:52:42 +00:00 committed by Richard Purdie
parent 4a32837971
commit 90ffdc01ba
1 changed files with 11 additions and 1 deletions

View File

@ -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():