Opened 3 years ago

Closed 3 years ago

#20844 closed Bug (fixed)

AdminEmailHandler does not utilze the 'formatter' setting.

Reported by: danols Owned by: danols
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


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 Changed 3 years ago by danols

  • Component changed from Uncategorized to Utilities
  • Easy pickings set
  • Has patch set
  • Keywords AdminEmailHandler Logging added
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to danols
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Type changed from Uncategorized to Bug

Patch in Git pull request:

Sample generated email subject:

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

Sample generated email message:

ERROR django.db.models.manager 2013-08-01 11:58:03,897 manager 6516 -1244890304 /srv/www/django/ Refactor this to use QuerySet level solution as per ticket - - Offer.objects.filter(...).active() !=

No stack trace available

Request repr() unavailable.}}}

comment:2 Changed 3 years ago by polmuz

  • Cc polmuz added
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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

comment:3 Changed 3 years ago by danols

You are right - I don't understand why. Regardless here is the original ticket branch:

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 Changed 3 years ago by timo

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

comment:5 Changed 3 years ago by danols

I wanted to keep changes to minimum but for sure agree with you - here is the updated code 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/ Refactor this to use QuerySet level solution as per ticket - - Offer.objects.filter(...).active() !=

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 Changed 3 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In ad6fcdb8d24d84a130f847f45b51d7e892ccca08:

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

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