Hello there, I haven't tried it myself but you could try subclassing django.utils.log.AdminEmailHandler to rely on the better-exceptions[0] package to _better_ format exceptions sent in text emails or simply set the include_html option[1] to True in your LOGGING configuration to get report similar to when DEBUG=True is enabled in development environment.
Cheers, Simon [0] https://github.com/Qix-/better-exceptions [1] https://docs.djangoproject.com/en/2.1/topics/logging/#django.utils.log.AdminEmailHandler Le vendredi 1 février 2019 05:11:47 UTC-5, Web Architect a écrit : > > Hi, > > In our production environment, we receive mail whenever an exception > happens in our django application. But it contains only the function > traces. The log will be helpful it also contains data dump or the local > variable dump for each function trace. > The exception trace on the browser in our development environment > (DEBUG=True) contains the local variable dump. > > Hence, could anyone let me know if it's possible to get the local variable > dump during exceptions in our django application? > > Thanks. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/23a98817-9898-494d-8aa0-c3df67c8c4f4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.