#16736: AdminEmailHandler ignores user args to log message.
------------------------------+-------------------------------
 Reporter:  saverio.trioni@…  |          Owner:  nobody
     Type:  Bug               |         Status:  new
Milestone:                    |      Component:  Uncategorized
  Version:  1.3               |       Severity:  Normal
 Keywords:  logging           |   Triage Stage:  Unreviewed
Has patch:  0                 |  Easy pickings:  1
    UI/UX:  0                 |
------------------------------+-------------------------------
 When using AdminEmailHandler to log own code, the mail subject and content
 has the raw LogRecord msg attribute instead of the LogRecord.getMessage()
 merged string.

 This appears when using the standard log API
 {{{
 foo, bar = 'hello', 'world'
 logger.error("The configuration is %s %s", foo, bar)
 }}}

 The email subject should be "The configuration is hello world" (barring
 configured prefixes), but is "The configuration is %s %s". The same
 happens to the email content.

 This can be solved using `record.getMessage()` instead of `record.msg` to
 get the message.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16736>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to