Skip to content

Commit

Permalink
Filtering out verify token bad request from error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MGS-sails committed Dec 11, 2023
1 parent 9199a56 commit c4da25e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions emgcli/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down Expand Up @@ -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'],
Expand Down

0 comments on commit c4da25e

Please sign in to comment.