Mailman: don't log disallowed host errors

This commit is contained in:
Aurélien Bompard 2016-10-03 16:38:42 +00:00
parent e8bbcb7a59
commit 8bb834ccaa
2 changed files with 6 additions and 10 deletions

View file

@ -1,9 +1,7 @@
from django.core.exceptions import DisallowedHost
from django.http import UnreadablePostError
from pylibmc import Error as MemcachedError
EXCLUDED = (
DisallowedHost,
UnreadablePostError,
MemcachedError,
)

View file

@ -343,6 +343,9 @@ LOGGING = {
'filename': '/var/log/hyperkitty/hyperkitty.log',
'formatter': 'verbose',
},
'null': {
'class': 'logging.NullHandler',
},
},
'loggers': {
'django.request': {
@ -354,14 +357,9 @@ LOGGING = {
],
'level': 'DEBUG',
},
'django.security': {
'handlers': [
'file',
{% if env == 'production' %}
'mail_admins',
{% endif %}
],
'level': 'DEBUG',
'django.security.DisallowedHost': {
'handlers': ['null'],
'propagate': False,
},
},
'formatters': {