summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-diffsigs
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-03-27 13:17:27 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-27 20:23:19 +0100
commit614cbeddc8f092bf2748ae7555d62467f3c45f16 (patch)
treee514a07f2b452a9314461798e0b86e3f0b0ca682 /bitbake/bin/bitbake-diffsigs
parentf41740ee8ee91a57f22ce7fa2a4b8ceeea78de0d (diff)
downloadpoky-614cbeddc8f092bf2748ae7555d62467f3c45f16.tar.gz
bitbake: lib/bb/msg: introduce logger_create() function
We use this code to set up a logger with colour in a number of different places, so create one function that does this and make some of bitbake's utility scripts use it. (Bitbake rev: b1ba7d1cc8ec33e2d081230287abd07f52136097) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-diffsigs')
-rwxr-xr-xbitbake/bin/bitbake-diffsigs14
1 files changed, 2 insertions, 12 deletions
diff --git a/bitbake/bin/bitbake-diffsigs b/bitbake/bin/bitbake-diffsigs
index c087f99bc5..1e3de092af 100755
--- a/bitbake/bin/bitbake-diffsigs
+++ b/bitbake/bin/bitbake-diffsigs
@@ -30,19 +30,9 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), '
30 30
31import bb.tinfoil 31import bb.tinfoil
32import bb.siggen 32import bb.siggen
33import bb.msg
33 34
34def logger_create(name, output=sys.stderr): 35logger = bb.msg.logger_create('bitbake-diffsigs')
35 logger = logging.getLogger(name)
36 console = logging.StreamHandler(output)
37 format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
38 if output.isatty():
39 format.enable_color()
40 console.setFormatter(format)
41 logger.addHandler(console)
42 logger.setLevel(logging.INFO)
43 return logger
44
45logger = logger_create('bitbake-diffsigs')
46 36
47def find_compare_task(bbhandler, pn, taskname): 37def find_compare_task(bbhandler, pn, taskname):
48 """ Find the most recent signature files for the specified PN/task and compare them """ 38 """ Find the most recent signature files for the specified PN/task and compare them """