debugging - How can I include the request.User details in Django's traceback email for a production site -
i include contents of request.user in context details emailed site admins when error occurs, traceback , request.get/post/cookies/meta
any appreciated.
because process_exception middleware gets passed request object, can add whatever info request.meta
class errormiddleware(object): """ alter httprequest objects on error """ def process_exception(self, request, exception): """ add user details. """ request.meta['user'] = request.user.username
Comments
Post a Comment