| 1 |
import logging |
| 2 |
|
| 3 |
from django.conf import settings |
| 4 |
from django.core.mail.backends.base import BaseEmailBackend |
| 5 |
from django.views.debug import ExceptionReporter |
| 6 |
|
| 7 |
|
| 8 |
class MyHandler(logging.Handler): |
| 9 |
def __init__(self): |
| 10 |
logging.Handler.__init__(self) |
| 11 |
self.config = settings.LOGGING |
| 12 |
|
| 13 |
|
| 14 |
class MyEmailBackend(BaseEmailBackend): |
| 15 |
def send_messages(self, email_messages): |
| 16 |
pass |
| 17 |
|
| 18 |
|
| 19 |
class CustomExceptionReporter(ExceptionReporter): |
| 20 |
def get_traceback_text(self): |
| 21 |
return "custom traceback text" |