Commit 0f33d3a4 authored by juga's avatar juga
Browse files

fix: scanner: log traceback instead of print it

parent 32f283f7
......@@ -70,7 +70,7 @@ def dumpstacks():
for thread_id, stack in sys._current_frames().items():
log.critical("Thread: %s(%d)",
thread_id2name.get(thread_id, ""), thread_id)
# If logging level is less than DEBUG (more verbose), start pdb so that
# developers can debug the issue.
if log.getEffectiveLevel() < logging.DEBUG:
......@@ -635,8 +635,10 @@ def force_get_results(pending_results):
# If the exception happened in the threads, `log.exception` does
# not have the traceback.
log.warning("traceback %s",
traceback.print_exception(type(e), e, e.__traceback__))
# Using `format_exception` instead of of `print_exception` to show
# the traceback in all the log handlers.
type(e), e, e.__traceback__)))
def run_speedtest(args, conf):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment