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