django/tests/logging_tests/logconfig.py
django-bot 6a682b38e7 [4.0.x] Refs #33476 -- Reformatted code with Black.
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
2022-02-08 12:15:38 +01:00

22 lines
521 B
Python

import logging
from django.conf import settings
from django.core.mail.backends.base import BaseEmailBackend
from django.views.debug import ExceptionReporter
class MyHandler(logging.Handler):
def __init__(self):
logging.Handler.__init__(self)
self.config = settings.LOGGING
class MyEmailBackend(BaseEmailBackend):
def send_messages(self, email_messages):
pass
class CustomExceptionReporter(ExceptionReporter):
def get_traceback_text(self):
return "custom traceback text"