mirror of
https://github.com/django/daphne.git
synced 2025-07-27 07:29:46 +03:00
Add logger traceback
This commit is contained in:
parent
18f2d67f34
commit
29dd563ce0
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user