@receiver(got_request_exception, weak=False)<EOL>def request_exception(sender, request, **kwargs):
if not isinstance(request, WSGIRequest):<EOL><INDENT>logger = logging.getLogger(__name__)<EOL>level = CRITICAL if request.status_code <= <NUM_LIT> else WARNING<EOL>logger.log(level, '<STR_LIT>',<EOL>request.status_code, request.reason_phrase)<EOL><DEDENT>else:<EOL><INDENT>logger = logging.getLogger(__name__)<EOL>logger.log(WARNING, '<STR_LIT>')<EOL><DEDENT>
Automated request exception logging.

The function can also return an WSGIRequest exception,
which does not supply either status_code or reason_phrase.