# HG changeset patch # User Marcin Kuzminski # Date 2018-02-19 13:49:21 # Node ID bf544c2faae92c58d5ee3082515959d07f5f08dc # Parent 44eba3e82a37a3edd4a2751cba5fa24c2bb85c77 logging: improve consistency of auth plugins logs. diff --git a/rhodecode/authentication/plugins/auth_crowd.py b/rhodecode/authentication/plugins/auth_crowd.py --- a/rhodecode/authentication/plugins/auth_crowd.py +++ b/rhodecode/authentication/plugins/auth_crowd.py @@ -281,5 +281,5 @@ class RhodeCodeAuthPlugin(RhodeCodeExter if group in user_attrs["groups"]: user_attrs["admin"] = True log.debug("Final crowd user object: \n%s" % (formatted_json(user_attrs))) - log.info('user %s authenticated correctly' % user_attrs['username']) + log.info('user `%s` authenticated correctly' % user_attrs['username']) return user_attrs diff --git a/rhodecode/authentication/plugins/auth_jasig_cas.py b/rhodecode/authentication/plugins/auth_jasig_cas.py --- a/rhodecode/authentication/plugins/auth_jasig_cas.py +++ b/rhodecode/authentication/plugins/auth_jasig_cas.py @@ -163,5 +163,5 @@ class RhodeCodeAuthPlugin(RhodeCodeExter 'extern_type': extern_type, } - log.info('user %s authenticated correctly' % user_attrs['username']) + log.info('user `%s` authenticated correctly' % user_attrs['username']) return user_attrs diff --git a/rhodecode/authentication/plugins/auth_ldap.py b/rhodecode/authentication/plugins/auth_ldap.py --- a/rhodecode/authentication/plugins/auth_ldap.py +++ b/rhodecode/authentication/plugins/auth_ldap.py @@ -486,7 +486,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExter 'extern_type': extern_type, } log.debug('ldap user: %s', user_attrs) - log.info('user %s authenticated correctly', user_attrs['username']) + log.info('user `%s` authenticated correctly', user_attrs['username']) return user_attrs diff --git a/rhodecode/authentication/plugins/auth_pam.py b/rhodecode/authentication/plugins/auth_pam.py --- a/rhodecode/authentication/plugins/auth_pam.py +++ b/rhodecode/authentication/plugins/auth_pam.py @@ -157,5 +157,5 @@ class RhodeCodeAuthPlugin(RhodeCodeExter pass log.debug("pamuser: %s", user_attrs) - log.info('user %s authenticated correctly' % user_attrs['username']) + log.info('user `%s` authenticated correctly' % user_attrs['username']) return user_attrs diff --git a/rhodecode/authentication/plugins/auth_rhodecode.py b/rhodecode/authentication/plugins/auth_rhodecode.py --- a/rhodecode/authentication/plugins/auth_rhodecode.py +++ b/rhodecode/authentication/plugins/auth_rhodecode.py @@ -127,11 +127,11 @@ class RhodeCodeAuthPlugin(RhodeCodeAuthP if userobj.username == User.DEFAULT_USER and userobj.active: log.info( - 'user %s authenticated correctly as anonymous user', userobj) + 'user `%s` authenticated correctly as anonymous user', userobj) return user_attrs elif userobj.username == username and password_match: - log.info('user %s authenticated correctly', userobj) + log.info('user `%s` authenticated correctly', userobj) return user_attrs log.info("user %s had a bad password when " "authenticating on this plugin", userobj) diff --git a/rhodecode/tests/auth_external_test.py b/rhodecode/tests/auth_external_test.py --- a/rhodecode/tests/auth_external_test.py +++ b/rhodecode/tests/auth_external_test.py @@ -100,7 +100,7 @@ class RhodeCodeAuthPlugin(RhodeCodeExter } log.debug('EXTERNAL user: \n%s' % formatted_json(user_attrs)) - log.info('user %s authenticated correctly' % user_attrs['username']) + log.info('user `%s` authenticated correctly' % user_attrs['username']) return user_attrs