]> code.ossystems Code Review - openembedded-core.git/commit
oe/utils: log exceptions in ThreadedWorker functions
authorRoss Burton <ross@burtonini.com>
Thu, 14 Oct 2021 16:33:18 +0000 (17:33 +0100)
committerSteve Sakoman <steve@sakoman.com>
Fri, 29 Oct 2021 14:48:40 +0000 (04:48 -1000)
commit3bad17c8cf58b2bfc36a1de754fa47fb344bd5d8
tree37ab3eec28b00c84ca849cdf3cf9771126d0d5d1
parentd91fe6ecb9fbb410b3bab6ced66b7fe5f869cf83
oe/utils: log exceptions in ThreadedWorker functions

If the function a ThreadedWorker is executing raises an exception, don't
use print() as that mostly disappears.  Instead, output it to the logger.

This is done using bb.mainlogger.debug directly instead of bb.debug() as
this allows us to pass the exception instance directly, which is then
incorporated into the log stream.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2f1ea25c222b344dd8b784b2bc73a6540ab30274)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oe/utils.py