diff --git a/lms/views/exceptions.py b/lms/views/exceptions.py index 28422dcc7f..4378d59255 100644 --- a/lms/views/exceptions.py +++ b/lms/views/exceptions.py @@ -1,3 +1,5 @@ +import logging + from pyramid import i18n from pyramid.config import not_ from pyramid.httpexceptions import HTTPClientError @@ -14,6 +16,8 @@ _ = i18n.TranslationStringFactory(__package__) +LOG = logging.getLogger(__name__) + @view_defaults(path_info=not_("^/api/.*"), renderer="lms:templates/error.html.jinja2") class ExceptionViews: @@ -94,6 +98,7 @@ def serializable_error(self): @exception_view_config(context=Exception) def error(self): + LOG.exception("Unexpected error %s", type(self.exception)) return self.error_response( 500, _(