error_notify: Remove custom email error reporting handler.

Restore the default django.utils.log.AdminEmailHandler when
ERROR_REPORTING is enabled.  Those with more sophisticated needs can
turn it off and use Sentry or a Sentry-compatible system.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit b285813beb)
This commit is contained in:
Anders Kaseorg
2023-06-09 16:01:05 -07:00
committed by Tim Abbott
parent 290b54a82d
commit a8675741a0
14 changed files with 5 additions and 580 deletions

View File

@@ -111,11 +111,6 @@ class ReturnTrue(logging.Filter):
return True
class ReturnEnabled(logging.Filter):
def filter(self, record: logging.LogRecord) -> bool:
return settings.LOGGING_ENABLED
class RequireReallyDeployed(logging.Filter):
def filter(self, record: logging.LogRecord) -> bool:
return settings.PRODUCTION