def get_stack_trace(self, record, request):

        from django.views.debug import ExceptionReporter

        stack_trace = ""
        if record.exc_info:
            exc_info = record.exc_info
            reporter = ExceptionReporter(request, *exc_info)
            stack_trace = "\n".join(
                traceback.format_exception(*record.exc_info)
            )
        return stack_trace
register a message handler to process messages send via send_message.
dataset/ETHPy150Open fairview/django-peavy/peavy/handlers.py/ExceptionLoggingHandler.get_stack_trace--crossover with--dataset/ETHPy150Open manahl/mdf/mdf/remote/messaging.py/register_message_handler