mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 08:56:10 +00:00
Change Humbug => Zulip in names of error reporting handlers.
(imported from commit 12e5486321303c80f6676c1f516ff35c3dcb676d)
This commit is contained in:
@@ -103,7 +103,7 @@ HASH_SALT = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|||||||
|
|
||||||
# Use this salt to hash a user's email into a filename for their user-uploaded
|
# Use this salt to hash a user's email into a filename for their user-uploaded
|
||||||
# avatar. If this salt is discovered, attackers will only be able to determine
|
# avatar. If this salt is discovered, attackers will only be able to determine
|
||||||
# that the owner of an email account has uploaded an avatar to Humbug, which isn't
|
# that the owner of an email account has uploaded an avatar to Zulip, which isn't
|
||||||
# the end of the world. Don't use the salt where there is more security exposure.
|
# the end of the world. Don't use the salt where there is more security exposure.
|
||||||
AVATAR_SALT = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
AVATAR_SALT = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||||
|
|
||||||
@@ -491,7 +491,7 @@ LOGGING = {
|
|||||||
'handlers': {
|
'handlers': {
|
||||||
'humbug_admins': {
|
'humbug_admins': {
|
||||||
'level': 'ERROR',
|
'level': 'ERROR',
|
||||||
'class': 'zerver.handlers.AdminHumbugHandler',
|
'class': 'zerver.handlers.AdminZulipHandler',
|
||||||
# For testing the handler delete the next line
|
# For testing the handler delete the next line
|
||||||
'filters': ['HumbugLimiter', 'require_debug_false', 'require_really_deployed'],
|
'filters': ['HumbugLimiter', 'require_debug_false', 'require_really_deployed'],
|
||||||
'formatter': 'default'
|
'formatter': 'default'
|
||||||
@@ -516,7 +516,7 @@ LOGGING = {
|
|||||||
# to replace the list of filters for mail_admins with 'nop'.
|
# to replace the list of filters for mail_admins with 'nop'.
|
||||||
'mail_admins': {
|
'mail_admins': {
|
||||||
'level': 'ERROR',
|
'level': 'ERROR',
|
||||||
'class': 'zerver.handlers.HumbugAdminEmailHandler',
|
'class': 'zerver.handlers.ZulipAdminEmailHandler',
|
||||||
# For testing the handler replace the filters list with just 'nop'
|
# For testing the handler replace the filters list with just 'nop'
|
||||||
'filters': ['EmailLimiter', 'require_debug_false', 'require_really_deployed'],
|
'filters': ['EmailLimiter', 'require_debug_false', 'require_really_deployed'],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ from django.views.debug import ExceptionReporter, get_exception_reporter_filter
|
|||||||
def format_record(record):
|
def format_record(record):
|
||||||
"""
|
"""
|
||||||
Given a Django error LogRecord, format and return the interesting details,
|
Given a Django error LogRecord, format and return the interesting details,
|
||||||
for use by notification mechanisms like Humbug and e-mail.
|
for use by notification mechanisms like Zulip and e-mail.
|
||||||
"""
|
"""
|
||||||
subject = '%s: %s' % (platform.node(), record.getMessage())
|
subject = '%s: %s' % (platform.node(), record.getMessage())
|
||||||
|
|
||||||
@@ -29,8 +29,8 @@ def format_record(record):
|
|||||||
|
|
||||||
return (subject, stack_trace, user_info)
|
return (subject, stack_trace, user_info)
|
||||||
|
|
||||||
class AdminHumbugHandler(logging.Handler):
|
class AdminZulipHandler(logging.Handler):
|
||||||
"""An exception log handler that Humbugs log entries to the Humbug realm.
|
"""An exception log handler that Zulips log entries to the Zulip realm.
|
||||||
|
|
||||||
If the request is passed as the first argument to the log record,
|
If the request is passed as the first argument to the log record,
|
||||||
request data will be provided in the email report.
|
request data will be provided in the email report.
|
||||||
@@ -82,7 +82,7 @@ class AdminHumbugHandler(logging.Handler):
|
|||||||
formatted_subject = subject.replace('\n', '\\n').replace('\r', '\\r')
|
formatted_subject = subject.replace('\n', '\\n').replace('\r', '\\r')
|
||||||
return formatted_subject[:MAX_SUBJECT_LENGTH]
|
return formatted_subject[:MAX_SUBJECT_LENGTH]
|
||||||
|
|
||||||
class HumbugAdminEmailHandler(AdminEmailHandler):
|
class ZulipAdminEmailHandler(AdminEmailHandler):
|
||||||
"""An exception log handler that emails log entries to site admins.
|
"""An exception log handler that emails log entries to site admins.
|
||||||
|
|
||||||
If the request is passed as the first argument to the log record,
|
If the request is passed as the first argument to the log record,
|
||||||
|
|||||||
Reference in New Issue
Block a user