Filter logging /lockout/
This commit is contained in:
@@ -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
|
||||
|
@@ -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'
|
||||
},
|
||||
|
Reference in New Issue
Block a user