#25373: Add logging for {% include %} exceptions when template.debug = False ---------------------------------+------------------------------------ Reporter: limnick | Owner: limnick Type: New feature | Status: assigned Component: Template system | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ---------------------------------+------------------------------------
Comment (by limnick): After some further digging it appears the django.template logger added in the commit I originally referenced will capture exceptions bubbled through this function, however it will also catch things like missing variables in templates and expected fallthrough behavior. All of this is at a level of DEBUG which seems appropriate. In order to be able to log only unexpected exceptions, I'm proposing adding WARNING level logging to any uncaught exceptions during import templatetag rendering. See attached patch for changes and regression test. -- Ticket URL: <https://code.djangoproject.com/ticket/25373#comment:8> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.f677b2b5bd795ddd95977eca11f28ce8%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.