2012-09-24 20:11:42 +00:00
|
|
|
import logging
|
|
|
|
|
|
|
|
from django.conf import settings
|
2012-11-19 17:57:40 +00:00
|
|
|
from django.core.mail.backends.base import BaseEmailBackend
|
2019-02-24 15:10:14 +00:00
|
|
|
from django.views.debug import ExceptionReporter
|
2012-11-19 17:57:40 +00:00
|
|
|
|
2012-09-24 20:11:42 +00:00
|
|
|
|
|
|
|
class MyHandler(logging.Handler):
|
2012-09-24 20:42:58 +00:00
|
|
|
def __init__(self):
|
|
|
|
logging.Handler.__init__(self)
|
2012-09-24 20:11:42 +00:00
|
|
|
self.config = settings.LOGGING
|
2012-11-19 17:57:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MyEmailBackend(BaseEmailBackend):
|
|
|
|
def send_messages(self, email_messages):
|
|
|
|
pass
|
2019-02-24 15:10:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CustomExceptionReporter(ExceptionReporter):
|
|
|
|
def get_traceback_text(self):
|
|
|
|
return "custom traceback text"
|