mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
logging: Report stack_info on logging.exception calls.
The exception trace only goes from where the exception was thrown up to where the `logging.exception` call is; any context as to where _that_ was called from is lost, unless `stack_info` is passed as well. Having the stack is particularly useful for Sentry exceptions, which gain the full stack trace. Add `stack_info=True` on all `logging.exception` calls with a non-trivial stack; we omit `wsgi.py`. Adjusts tests to match.
This commit is contained in:
committed by
Tim Abbott
parent
e3a093b73f
commit
2928bbc8bd
@@ -34,7 +34,7 @@ if settings.USING_RABBITMQ:
|
||||
|
||||
|
||||
def handle_callback_exception(callback: Callable[..., Any]) -> None:
|
||||
logging.exception("Exception in callback")
|
||||
logging.exception("Exception in callback", stack_info=True)
|
||||
app_log.error("Exception in callback %r", callback, exc_info=True)
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
||||
Reference in New Issue
Block a user