From ec8dff83ada97ea7cc9404f6910c58ca96995395 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 22 Jun 2018 22:45:04 +0200 Subject: [PATCH] settings: set all Lasso logs at the DEBUG level (fixes #22880) Log domain of lasso has changed from lasso to Lasso and libxmlsec and libxml2 errors now are logged in their own domains. --- debian-jessie/debian_config.py | 8 +++++++- debian-wheezy/debian_config.py | 8 +++++++- src/authentic2/settings.py | 13 +++++++++++-- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/debian-jessie/debian_config.py b/debian-jessie/debian_config.py index 7340df43..092c0041 100644 --- a/debian-jessie/debian_config.py +++ b/debian-jessie/debian_config.py @@ -99,7 +99,13 @@ LOGGING = { 'level': 'WARNING', }, # lasso has the bad habit of logging everything as errors - 'lasso': { + 'Lasso': { + 'filters': ['force_debug'], + }, + 'libxml2': { + 'filters': ['force_debug'], + }, + 'libxmlsec': { 'filters': ['force_debug'], }, '': { diff --git a/debian-wheezy/debian_config.py b/debian-wheezy/debian_config.py index 37b6b93e..2791aa5b 100644 --- a/debian-wheezy/debian_config.py +++ b/debian-wheezy/debian_config.py @@ -100,7 +100,13 @@ LOGGING = { 'propagate': True, }, # lasso has the bad habit of logging everything as errors - 'lasso': { + 'Lasso': { + 'filters': ['force_debug'], + }, + 'libxml2': { + 'filters': ['force_debug'], + }, + 'libxmlsec': { 'filters': ['force_debug'], }, '': { diff --git a/src/authentic2/settings.py b/src/authentic2/settings.py index 2b935d1c..bd11501c 100644 --- a/src/authentic2/settings.py +++ b/src/authentic2/settings.py @@ -210,6 +210,9 @@ LOGGING = { }, 'force_debug': { '()': 'authentic2.log_filters.ForceDebugFilter', + }, + 'lasso': { + '()': 'authentic2.log_filters.LassoFilter', } }, 'formatters': { @@ -227,7 +230,7 @@ LOGGING = { 'level': 'DEBUG', 'class':'logging.StreamHandler', 'formatter': 'verbose', - 'filters': ['cleaning', 'request_context'], + 'filters': ['cleaning', 'request_context', 'lasso'], }, # remove request_context filter for db log to prevent infinite loop # when logging sql query to retrieve the session user @@ -254,7 +257,13 @@ LOGGING = { 'level': 'WARNING', }, # lasso has the bad habit of logging everything as errors - 'lasso': { + 'Lasso': { + 'filters': ['force_debug'], + }, + 'libxml2': { + 'filters': ['force_debug'], + }, + 'libxmlsec': { 'filters': ['force_debug'], }, '': { -- 2.18.0