Add logger traceback

This commit is contained in:
Sergey D 2020-01-31 19:42:12 +03:00
parent 18f2d67f34
commit 29dd563ce0

View File

@ -283,13 +283,8 @@ class Server(object):
# Protocol is asking the server to exit (likely during test) # Protocol is asking the server to exit (likely during test)
self.stop() self.stop()
else: else:
exception_output = "{}\n{}{}".format(
exception,
"".join(traceback.format_tb(exception.__traceback__)),
" {}".format(exception),
)
logger.error( logger.error(
"Exception inside application: %s", exception_output "Exception inside application: %s", exception.__repr__, stack_info=True
) )
if not disconnected: if not disconnected:
protocol.handle_exception(exception) protocol.handle_exception(exception)