Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#15628 closed (fixed)

AdminEmailHandler is useless without request in record

Reported by: Hynek Schlawack Owned by: nobody
Component: Contrib apps Version: master
Severity: Keywords: logging
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There is an obvious bug inside django/utils/log.py.

If no request is supplied with the LogRecord, the subject of the mail is set flatly to "Error: Unknown URL". This contradicts the docs (http://docs.djangoproject.com/en/dev/topics/logging/#id2).

The attached patch fixes that by setting the subject the same way as before but omitting the IP if no request has been supplied.

It would be awesome if that could make it into 1.3.

Attachments (1)

log-without-request.diff (519 bytes) - added by Hynek Schlawack 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Hynek Schlawack

Attachment: log-without-request.diff added

comment:1 Changed 6 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

In [15869]:

(The changeset message doesn't reference this ticket)

comment:3 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top