using record.exc_info to build traceback

This commit is contained in:
landi 2020-09-25 13:02:44 +02:00
parent 79b4d1de5c
commit db13ae6fdc

View file

@ -94,7 +94,8 @@ class RichHandler(Handler):
traceback = None
if self.handle_tracebacks and record.exc_info:
traceback = Traceback(
traceback = Traceback.from_exception(
*record.exc_info,
width=self.tracebacks_width,
extra_lines=self.tracebacks_extra_lines,
theme=self.tracebacks_theme,