          log_response(
              '%s: %s', response.reason_phrase, request.path,
              response=response,
              request=request,
              exc_info=sys.exc_info(),
          )
  
      # Force a TemplateResponse to be rendered.
      if not getattr(response, 'is_rendered', True) and callable(getattr(response, 'render', None)):
          response = response.render()
 
</s> remove             exc_info=sys.exc_info(),
 </s> add             exception=exc, </s> remove     # response is the result of an exception and is logged at the time the
    # exception is caught so that the exc_info can be recorded.
 </s> add     # response is the result of an exception and is logged when the exception
    # is caught, to record the exception. </s> remove def log_response(message, *args, response=None, request=None, logger=request_logger, level=None, exc_info=None):
 </s> add def log_response(message, *args, response=None, request=None, logger=request_logger, level=None, exception=None): </s> remove             exc_info=sys.exc_info(),
 </s> add             exception=exc, </s> remove         exc_info=exc_info,
 </s> add         exc_info=exception,
            exception=exc,
          log_response(
              '%s: %s', response.reason_phrase, request.path,
              response=response,
              request=request,
            exception=exc,
          )
  
      # Force a TemplateResponse to be rendered.
      if not getattr(response, 'is_rendered', True) and callable(getattr(response, 'render', None)):
          response = response.render()
keep keep keep keep replace keep keep keep keep keep
 Changed django.utils.log.log_response() to take exception instance.

There's little point retrieving a fresh reference to the exception in
the legacy tuple format, when it's all available via the exception
instance we already have. 
django/core/handlers/exception.py