]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 17 Oct 2021 11:14:29 +0000 (12:14 +0100)
commit2f1ea25c222b344dd8b784b2bc73a6540ab30274
tree92e117a297f8649aaec6b8b99881f5b4f9d877b7
parent9a9cd95fcc792b1daf71d75aa61488611e9490ce
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>
meta/lib/oe/utils.py