mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +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
@@ -63,7 +63,7 @@ def webathena_kerberos_login(request: HttpRequest, user_profile: UserProfile,
|
||||
api_key,
|
||||
base64.b64encode(ccache).decode("utf-8")])
|
||||
except Exception:
|
||||
logging.exception("Error updating the user's ccache")
|
||||
logging.exception("Error updating the user's ccache", stack_info=True)
|
||||
return json_error(_("We were unable to setup mirroring for you"))
|
||||
|
||||
return json_success()
|
||||
|
||||
Reference in New Issue
Block a user