summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin')
-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():