Ticket #14972: adminemailhandler.patch
File adminemailhandler.patch, 1.2 KB (added by , 14 years ago) |
---|
-
django/utils/log.py
80 80 request_repr = "Request repr() unavailable" 81 81 82 82 if record.exc_info: 83 exc_info = record.exc_info 84 stack_trace = '\n'.join(traceback.format_exception(*record.exc_info)) 83 message = '\nSTACK_TRACE:\n'.join(traceback.format_exception(*record.exc_info)) 84 reporter = ExceptionReporter(request, is_email=True, *record.exc_info) 85 html_message = reporter.get_traceback_html() 85 86 else: 86 exc_info = () 87 stack_trace = 'No stack trace available' 88 89 message = "%s\n\n%s" % (stack_trace, request_repr) 90 reporter = ExceptionReporter(request, is_email=True, *exc_info) 91 html_message = reporter.get_traceback_html() 87 message = '\n%s\n\nNo stack trace available' % record.msg 88 html_message = None 89 90 message = "%s\n\n%s" % (message, request_repr) 92 91 mail.mail_admins(subject, message, fail_silently=True, 93 92 html_message=html_message)