Skip to content

Commit e3badfe

Browse files
authored
Merge pull request #4879 from dojutsu-user/disable-allowed-host-logging
Disable django.security.DisallowedHost from logging
2 parents ce0948f + 7a5471a commit e3badfe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

readthedocs/settings/base.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,9 @@ def USE_PROMOS(self): # noqa
390390
'filename': os.path.join(LOGS_ROOT, 'debug.log'),
391391
'formatter': 'default',
392392
},
393+
'null': {
394+
'class': 'logging.NullHandler',
395+
},
393396
},
394397
'loggers': {
395398
'': { # root logger
@@ -403,5 +406,9 @@ def USE_PROMOS(self): # noqa
403406
# Don't double log at the root logger for these.
404407
'propagate': False,
405408
},
409+
'django.security.DisallowedHost': {
410+
'handlers': ['null'],
411+
'propagate': False,
412+
},
406413
},
407414
}

0 commit comments

Comments
 (0)