Merge branch 'member-summary'
This commit is contained in:
commit
19fa620296
|
@ -14,7 +14,7 @@ def ldap_api(route, data):
|
|||
try:
|
||||
headers = {'Authorization': 'Token ' + secrets.LDAP_API_KEY}
|
||||
url = secrets.LDAP_API_URL + route
|
||||
r = requests.post(url, data=data, headers=headers, timeout=3)
|
||||
r = requests.post(url, data=data, headers=headers, timeout=5)
|
||||
return r.status_code
|
||||
except BaseException as e:
|
||||
logger.error('LDAP {} - {} - {}'.format(url, e.__class__.__name__, str(e)))
|
||||
|
|
|
@ -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'
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user