From c4da25e9966527280fa61dc5c64c96451487ca1d Mon Sep 17 00:00:00 2001 From: Mahfouz Date: Mon, 11 Dec 2023 16:28:12 +0000 Subject: [PATCH] Filtering out verify token bad request from error logs --- emgcli/settings.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emgcli/settings.py b/emgcli/settings.py index d31947da0..e7e72017e 100644 --- a/emgcli/settings.py +++ b/emgcli/settings.py @@ -87,6 +87,10 @@ '()': 'django.utils.log.CallbackFilter', 'callback': lambda record: "v1/utils/myaccounts" not in record.getMessage(), }, + 'exclude_token_verification': { + '()': 'django.utils.log.CallbackFilter', + 'callback': lambda record: "v1/utils/token/verify" not in record.getMessage(), + }, }, 'formatters': { 'default': { @@ -136,13 +140,13 @@ 'handlers': ['default'], 'level': 'INFO', 'propagate': False, - 'filters': ['exclude_myaccounts'], + 'filters': ['exclude_myaccounts', 'exclude_token_verification'], }, 'django.server': { 'handlers': ['default'], 'level': 'INFO', 'propagate': False, - 'filters': ['exclude_myaccounts'], + 'filters': ['exclude_myaccounts', 'exclude_token_verification'], }, 'django': { 'handlers': ['null'],