Ticket #15628: log-without-request.diff

File log-without-request.diff, 519 bytes (added by hynek, 4 years ago)
  • django/utils/log.py

    diff --git a/django/utils/log.py b/django/utils/log.py
    index 763e667..4fb75b1 100644
    a b class AdminEmailHandler(logging.Handler): 
    7979            )
    8080            request_repr = repr(request)
    8181        except:
    82             subject = 'Error: Unknown URL'
     82            subject = '%s: %s' % (
     83                record.levelname,
     84                record.msg
     85            )
     86
    8387            request = None
    8488            request_repr = "Request repr() unavailable"
    8589
Back to Top