If you mean something like: logger.exception("Ed's message is this err = '%s'" %(err),exc_info=err) or logger.exception("Ed's message is this err = '%s'" %(err),exc_info=err,stack_info=True) (if we want to see the exception stack search) Then, i'd agree your way is better/clearer. -b an intel employee On Fri, Jul 8, 2016 at 9:03 PM, Christopher Larson wrote: > > On Fri, Jul 8, 2016 at 5:52 PM, brian avery wrote: > >> From: Ed Bartosh >> >> Runqueue errors direct the user to view the "failure below", >> but no additional error message is available. >> >> Log the stacktrace so that the user can see what went wrong. >> >> Signed-off-by: Ed Bartosh >> Signed-off-by: brian avery >> --- >> lib/bb/runqueue.py | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py >> index 57be15a..04f2f4c 100644 >> --- a/lib/bb/runqueue.py >> +++ b/lib/bb/runqueue.py >> @@ -1219,8 +1219,10 @@ class RunQueue: >> pass >> self.state = runQueueComplete >> raise >> - except: >> - logger.error("An uncaught exception occured in runqueue, >> please see the failure below:") >> + except Exception as err: >> + import traceback >> + logger.error("An uncaught exception occured in runqueue: >> '%s'" % err) >> + logger.error(traceback.format_exc()) >> > > Is there a reason we aren't just passing the exception in and letting the > logging format it and pass it through to the UI for formatting? See > logger.exception() and the exc_info= keyword argument for error(). > -- > Christopher Larson > clarson at kergoth dot com > Founder - BitBake, OpenEmbedded, OpenZaurus > Maintainer - Tslib > Senior Software Engineer, Mentor Graphics >