diff options
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(): |