diff --git a/various/log_filters.py b/various/log_filters.py new file mode 100644 index 00000000..c69c0bae --- /dev/null +++ b/various/log_filters.py @@ -0,0 +1,6 @@ +from logging import Filter, INFO +class Http404AsInfoFilter(Filter): + def filter(self, record): + if record.name == 'django.request' and record.status_code == 404: + record.levelno = INFO + return 1 # Keep the log record