]> git.parisson.com Git - django-social-auth.git/commitdiff
Make a named logger available everywhere we might need it.
authorMathijs de Bruin <mathijs@mathijsfietst.nl>
Mon, 19 Sep 2011 12:14:35 +0000 (14:14 +0200)
committerMathijs de Bruin <mathijs@mathijsfietst.nl>
Mon, 19 Sep 2011 12:14:35 +0000 (14:14 +0200)
social_auth/backends/__init__.py
social_auth/backends/contrib/foursquare.py
social_auth/backends/contrib/github.py
social_auth/backends/contrib/linkedin.py
social_auth/backends/contrib/livejournal.py
social_auth/backends/contrib/orkut.py
social_auth/backends/facebook.py
social_auth/backends/google.py
social_auth/backends/twitter.py
social_auth/backends/yahoo.py
social_auth/views.py

index 8fa45a1e495ad3107e379e0d89d5406a933dc99c..9ec7a5d6d82b2f1d588674e068aa4d595ff295fc 100644 (file)
@@ -9,6 +9,9 @@ Also the modules *must* define a BACKENDS dictionary with the backend name
 (which is used for URLs matching) and Auth class, otherwise it won't be
 enabled.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 from os import walk
 from os.path import basename
 from uuid import uuid4
index f0def0d0b0e9bd2dcfdba28b4c0aad1b75a69cb6..86dc7b9182cc6cb80073b4f7686a576c79106501 100644 (file)
@@ -1,3 +1,6 @@
+import logging
+logger = logging.getLogger(__name__)
+
 import urllib
 
 from django.utils import simplejson
index 124bc225b3749f9ae9873a0ff1d2c16af6df1891..b24462af126b6896094618c3d0ddd875f74768fc 100644 (file)
@@ -11,6 +11,9 @@ setting, it must be a list of values to request.
 By default account id and token expiration time are stored in extra_data
 field, check OAuthBackend class for details on how to extend it.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 import cgi
 import urllib
 
index 72740f55f5e349ccef936440c249cfa86f9b068a..00ac92bf0ff3fd1a8a2288af9184a8d42c5909cc 100644 (file)
@@ -3,6 +3,9 @@ Linkedin OAuth support
 
 No extra configurations are needed to make this work.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 from xml.etree import ElementTree
 from xml.parsers.expat import ExpatError
 
index ce9e538d9d5bb40f81511a9fbc862b2048748c08..b5ca7e03af5d4801f73791025d1439c59a0fd8c1 100644 (file)
@@ -4,6 +4,9 @@ LiveJournal OpenID support.
 This contribution adds support for LiveJournal OpenID service in the form
 username.livejournal.com. Username is retrieved from the identity url.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 import urlparse
 
 from social_auth.backends import OpenIDBackend, OpenIdAuth, USERNAME
index 9b0669819981256e77d07322ad3407a45135592f..ce3ef06b31e00334437db0637c5c585ca7fcb1ff 100644 (file)
@@ -10,6 +10,9 @@ can be specified by defining ORKUT_EXTRA_DATA setting.
 OAuth settings ORKUT_CONSUMER_KEY and ORKUT_CONSUMER_SECRET are needed
 to enable this service support.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 import urllib
 
 from django.conf import settings
index 661bc471a84aa768ba8f92b220e74971a77cb87a..5aff9ed407c492acf80924baadf14588bc15fb74 100644 (file)
@@ -11,6 +11,9 @@ setting, it must be a list of values to request.
 By default account id and token expiration time are stored in extra_data
 field, check OAuthBackend class for details on how to extend it.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 import cgi
 from urllib import urlencode
 from urllib2 import urlopen
index 52f701f12cdce3a70e38278d012a210cea2af7d8..621327fbc9b45148b1c4a0c989665eabbe860fdc 100644 (file)
@@ -13,6 +13,9 @@ APIs console https://code.google.com/apis/console/ Identity option.
 
 OpenID also works straightforward, it doesn't need further configurations.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 from urllib import urlencode
 from urllib2 import Request, urlopen
 
index 8f87cf84e4157189f99da238b6eb77897ef3da0e..403a80856a3851c2da601a76ed7ddc51ce352cb5 100644 (file)
@@ -11,6 +11,9 @@ User screen name is used to generate username.
 By default account id is stored in extra_data field, check OAuthBackend
 class for details on how to extend it.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 from django.utils import simplejson
 
 from social_auth.backends import ConsumerBasedOAuth, OAuthBackend, USERNAME
index e9362f4c8f293bc451e91ea364f0f3936fa66331..e17577e432d8f3c3430c39191bc00dcd64bea64f 100644 (file)
@@ -3,6 +3,9 @@ Yahoo OpenID support
 
 No extra configurations are needed to make this work.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 from social_auth.backends import OpenIDBackend, OpenIdAuth
 
 
index 45afdf2d9181008ad615dd91f35dc977db41fe79..43442f72b7be238a3751e1fe1397242a7395762f 100644 (file)
@@ -5,6 +5,9 @@ Notes:
       on third party providers that (if using POST) won't be sending crfs
       token back.
 """
+import logging
+logger = logging.getLogger(__name__)
+
 from functools import wraps
 
 from django.conf import settings