[bitbake-devel] [PATCH] bitbake: buildinfohelper: Make sure we use the orm defined value for loglevel
Michael Wood
michael.g.wood at intel.com
Tue Oct 28 17:47:12 UTC 2014
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 at intel.com>
---
bitbake/lib/bb/ui/buildinfohelper.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 3800626..fcef53b 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -983,14 +983,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
--
1.9.1
More information about the bitbake-devel
mailing list