Filter logging /lockout/

This commit is contained in:
Tanner Collin 2020-11-07 21:27:10 +00:00
parent aaa29715c6
commit e8198f7b2a
2 changed files with 11 additions and 1 deletions

View File

@ -8,3 +8,10 @@ class IgnoreStats(logging.Filter):
return False
else:
return True
class IgnoreLockout(logging.Filter):
def filter(self, record):
if 'GET /lockout/' in record.msg:
return False
else:
return True

View File

@ -221,11 +221,14 @@ LOGGING = {
'ignore_stats': {
'()': 'apiserver.filters.IgnoreStats',
},
'ignore_lockout': {
'()': 'apiserver.filters.IgnoreLockout',
},
},
'handlers': {
'console': {
'level': 'DEBUG',
'filters': ['ignore_stats'],
'filters': ['ignore_stats', 'ignore_lockout'],
'class': 'logging.StreamHandler',
'formatter': 'medium'
},