From: Mathijs de Bruin Date: Mon, 19 Sep 2011 13:00:53 +0000 (+0200) Subject: Some more logging. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6a5a9a642a9082a90172ea5b43bcda1538daa7ab;p=django-social-auth.git Some more logging. --- diff --git a/social_auth/backends/__init__.py b/social_auth/backends/__init__.py index 5832e7e..b0470d1 100644 --- a/social_auth/backends/__init__.py +++ b/social_auth/backends/__init__.py @@ -38,6 +38,7 @@ from social_auth.models import UserSocialAuth from social_auth.store import DjangoOpenIDStore from social_auth.signals import pre_update, socialauth_registered, \ socialauth_not_registered +from social_auth.utils import sanitize_log_data # OpenID configuration @@ -136,6 +137,8 @@ class SocialAuthBackend(ModelBackend): user = None if not user: username = self.username(details) + logger.debug('Creating new user with username %s and email %s', + username, sanitize_log_data(email)) user = User.objects.create_user(username=username, email=email) is_new = True @@ -223,6 +226,8 @@ class SocialAuthBackend(ModelBackend): # check if values update should be left to signals handlers only if not CHANGE_SIGNAL_ONLY: + logger.debug('Updating user details for user %s', username, + extra=dict(data=details)) for name, value in details.iteritems(): # do not update username, it was already generated by # self.username(...) and loaded in given instance