#36487: Database on commit error logging fails for partials
-------------------------------------+-------------------------------------
Reporter: Krishnaprasad MG | Owner:
| Krishnaprasad MG
Type: Bug | Status: assigned
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Krishnaprasad MG):
One more possible improvement would be to replace the f-string with %s
placeholder in log messages if that makes sense
`logger.exception(f"Error calling {name} in on_commit() (%s).", e)` to
`logger.exception("Error calling %s in on_commit() (%s).", name, e)`
because this helps log collecting systems like Sentry to effectively
aggregate log messages without creating separate log messages. Also
mentioned in google style guide:
https://google.github.io/styleguide/pyguide.html#3101-logging
--
Ticket URL: <https://code.djangoproject.com/ticket/36487#comment:3>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070197ca624015-9309f109-9f6b-4450-ac5a-62e51130ed64-000000%40eu-central-1.amazonses.com.