[Patchew-devel] [PATCH] settings: disable template logs
Paolo Bonzini
pbonzini at redhat.com
Fri Mar 15 16:20:01 UTC 2019
Template logs are consuming gigabytes of disk on both patchew.org
and next.patchew.org because of VariableDoesNotExist errors.
Disable them since they are harmless.
Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
patchew/settings.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/patchew/settings.py b/patchew/settings.py
index 773ff0e..11a79b4 100644
--- a/patchew/settings.py
+++ b/patchew/settings.py
@@ -218,6 +218,10 @@ if not DEBUG:
'class': 'logging.FileHandler',
'filename': os.path.join(DATA_DIR, "log", "patchew.log"),
},
+ 'null': {
+ 'level': 'DEBUG',
+ 'class': 'logging.NullHandler',
+ },
},
'loggers': {
'django': {
@@ -225,5 +229,10 @@ if not DEBUG:
'level': 'DEBUG',
'propagate': True,
},
+ 'django.template': {
+ 'handlers': ['null'], # Quiet by default!
+ 'propagate': False,
+ 'level': 'DEBUG',
+ },
},
}
--
2.20.1
More information about the Patchew-devel
mailing list