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@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
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel
On Fri, 03/15 17:20, Paolo Bonzini wrote:
> 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@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
Reviewed-by: Fam Zheng <fam@euphon.net>
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel
© 2016 - 2026 Red Hat, Inc.