Opened 11 years ago

Closed 11 years ago

#20844 closed Bug (fixed)

AdminEmailHandler does not utilze the 'formatter' setting.

Reported by: Daniel Sokolowski Owned by: Daniel Sokolowski
Component: Utilities Version: 1.5
Severity: Normal Keywords: AdminEmailHandler, Logging
Cc: polmuz Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

Emailed log messages through the AdminEmailHandler only include the message as returned by the do record.getMessage() method and omit utilizing the formatter string setting. A patch that will include the formatted log entry in the body of the email will follow shortly.

Change History (6)

comment:1 by Daniel Sokolowski, 11 years ago

Component: UncategorizedUtilities
Easy pickings: set
Has patch: set
Keywords: AdminEmailHandler Logging added
Owner: changed from nobody to Daniel Sokolowski
Status: newassigned
Type: UncategorizedBug

Patch in Git pull request: https://github.com/django/django/pull/1423

Sample generated email subject:

`[Some Site][Development] ERROR: Refactor this to use QuerySet level solution as per ticket - https://code.djangoproject.com/ticket/20625 - Offer.objects.filter(...).active() != Offer.objects.active.filter(...)`

Sample generated email message:

ERROR django.db.models.manager 2013-08-01 11:58:03,897 manager 6516 -1244890304 /srv/www/django/development.yupi.ca/src/github-danielsokolowski-django-ticket_20625-tailored/django/db/models/manager.py@139: Refactor this to use QuerySet level solution as per ticket - https://code.djangoproject.com/ticket/20625 - Offer.objects.filter(...).active() != Offer.objects.active.filter(...)

No stack trace available

Request repr() unavailable.}}}

comment:2 by polmuz, 11 years ago

Cc: polmuz added
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

There's something weird with the pull request, I'm seeing 14 extra commits that are not related to this issue.

comment:3 by Daniel Sokolowski, 11 years ago

You are right - I don't understand why. Regardless here is the original ticket branch: https://github.com/danielsokolowski/django/tree/master-ticket-20844

And new pull request here --- well something very odd indeed I can not create a new pull request; I will look into this when I find more time, thanks for pointing out the issue.

comment:4 by Tim Graham, 11 years ago

I'm not sure about this change as it stands right now. With it, tracebacks are included twice in each email.

comment:5 by Daniel Sokolowski, 11 years ago

I wanted to keep changes to minimum but for sure agree with you - here is the updated code https://github.com/danielsokolowski/django/tree/master-ticket-20844 which does not duplicate the stack trace.

Sample email:

Subject: [Yupi][Development] ERROR (EXTERNAL IP): Internal Server Error: /offers/negotiate/1/1/

WARNING django.db.models.manager 2013-09-12 09:38:02,049 manager 6626 -1244792000 /srv/www/django/development.yupi.ca/src/github-danielsokolowski-django-ticket_20625-tailored/django/db/models/manager.py@139: Refactor this to use QuerySet level solution as per ticket - https://code.djangoproject.com/ticket/20625 - Offer.objects.filter(...).active() != Offer.objects.active.filter(...)

Request repr(): unavailable

Now does anyone is having issue creating git pull requests? I am unable to create a pull request - it just cycles me back to the creation page - tried three different browsers so it does not appear to be a front end issue.

comment:6 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In ad6fcdb8d24d84a130f847f45b51d7e892ccca08:

Fixed #20844 -- Made AdminEmailHandler respect LOGGING 'formatter' setting.

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