logging: changed module in logs extra as it is a reserved keyword
This commit is contained in:
parent
446b48dea6
commit
8a95bb9eb4
4 changed files with 5 additions and 5 deletions
|
|
@ -223,7 +223,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExternalAuthPlugin):
|
|||
}
|
||||
|
||||
log.info('user `%s` authenticated correctly', user_attrs['username'],
|
||||
extra={"action": "user_auth_ok", "module": "auth_headers", "username": user_attrs["username"]})
|
||||
extra={"action": "user_auth_ok", "auth_module": "auth_headers", "username": user_attrs["username"]})
|
||||
return user_attrs
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -535,7 +535,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExternalAuthPlugin):
|
|||
|
||||
log.debug('ldap user: %s', user_attrs)
|
||||
log.info('user `%s` authenticated correctly', user_attrs['username'],
|
||||
extra={"action": "user_auth_ok", "module": "auth_ldap", "username": user_attrs["username"]})
|
||||
extra={"action": "user_auth_ok", "auth_module": "auth_ldap", "username": user_attrs["username"]})
|
||||
|
||||
return user_attrs
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExternalAuthPlugin):
|
|||
|
||||
log.debug("pamuser: %s", user_attrs)
|
||||
log.info('user `%s` authenticated correctly', user_attrs['username'],
|
||||
extra={"action": "user_auth_ok", "module": "auth_pam", "username": user_attrs["username"]})
|
||||
extra={"action": "user_auth_ok", "auth_module": "auth_pam", "username": user_attrs["username"]})
|
||||
return user_attrs
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -168,12 +168,12 @@ class RhodeCodeAuthPlugin(RhodeCodeAuthPluginBase):
|
|||
if userobj.username == User.DEFAULT_USER and userobj.active:
|
||||
log.info('user `%s` authenticated correctly as anonymous user',
|
||||
userobj.username,
|
||||
extra={"action": "user_auth_ok", "module": "auth_rhodecode_anon", "username": userobj.username})
|
||||
extra={"action": "user_auth_ok", "auth_module": "auth_rhodecode_anon", "username": userobj.username})
|
||||
return user_attrs
|
||||
|
||||
elif userobj.username == username and password_match:
|
||||
log.info('user `%s` authenticated correctly', userobj.username,
|
||||
extra={"action": "user_auth_ok", "module": "auth_rhodecode", "username": userobj.username})
|
||||
extra={"action": "user_auth_ok", "auth_module": "auth_rhodecode", "username": userobj.username})
|
||||
return user_attrs
|
||||
log.warning("user `%s` used a wrong password when "
|
||||
"authenticating on this plugin", userobj.username)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue