summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2014-10-28 17:47:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 10:09:50 +0000
commit926235aad806232bc73e33d6dd8955dd26562e6b (patch)
tree1f7aa437c7441f35db0d631ee80290c473f5e2a5
parent90b05e79764b684b20ce8454e89f05763b02ac97 (diff)
downloadbitbake-926235aad806232bc73e33d6dd8955dd26562e6b.tar.gz
buildinfohelper: Make sure we use the orm defined value for loglevel
We need to consistently use LogMessage.INFO/WARNING/ERROR to make sure toaster knows how to categories these rather than passing in the "raw" loglevel value which in best case comes from python logging but worst case any value. [YOCTO 6885] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/ui/buildinfohelper.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 7017305ae..a0a2d80ff 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -979,14 +979,12 @@ class BuildInfoHelper(object):
log_information = {}
log_information['build'] = self.internal_state['build']
- if event.levelno >= format.ERROR:
- log_information['level'] = event.levelno
+ if event.levelno == format.ERROR:
+ log_information['level'] = LogMessage.ERROR
elif event.levelno == format.WARNING:
log_information['level'] = LogMessage.WARNING
- elif event.levelno == format.INFO:
- log_information['level'] = LogMessage.INFO
else:
- log_information['level'] = event.levelno
+ log_information['level'] = LogMessage.INFO
log_information['message'] = event.msg
log_information['pathname'] = event.pathname