      request are passed to the logger's extra parameter.
      """
      # Check if the response has already been logged. Multiple requests to log
      # the same response can be received in some cases, e.g., when the
      # 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.
      if getattr(response, '_has_been_logged', False):
          return
  
      if level is None:
          if response.status_code >= 500:
 
</s> remove             exc_info=sys.exc_info(),
 </s> add             exception=exc, </s> remove             exc_info=sys.exc_info(),
 </s> add             exception=exc, </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,
    # response is the result of an exception and is logged when the exception
    # is caught, to record the exception.
      request are passed to the logger's extra parameter.
      """
      # Check if the response has already been logged. Multiple requests to log
      # the same response can be received in some cases, e.g., when the
    # response is the result of an exception and is logged when the exception
    # is caught, to record the exception.
    # response is the result of an exception and is logged when the exception
    # is caught, to record the exception.
      if getattr(response, '_has_been_logged', False):
          return
  
      if level is None:
          if response.status_code >= 500:
keep keep keep keep replace 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/utils/log.py