From: Sebastian Annies Date: Wed, 26 Oct 2011 00:31:51 +0000 (+0200) Subject: do some logging X-Git-Tag: 22.4~32^2 X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/commitdiff_plain/611a6c53c6fe16bee0673b0a815d1f35ce303360?hp=--cc do some logging --- 611a6c53c6fe16bee0673b0a815d1f35ce303360 diff --git a/cas_provider/views.py b/cas_provider/views.py index 5b66681..953847b 100644 --- a/cas_provider/views.py +++ b/cas_provider/views.py @@ -1,3 +1,4 @@ +import logging from lxml import etree from urllib import urlencode import urllib2 @@ -29,6 +30,8 @@ ERROR_MESSAGES = ( ) +logger = logging.getLogger(__name__) + def login(request, template_name='cas/login.html',\ success_redirect=settings.LOGIN_REDIRECT_URL, warn_template_name='cas/warn.html', @@ -200,8 +203,10 @@ def generate_proxy_granting_ticket(pgt_url, ticket): response = urllib2.urlopen(urlparse.urlunsplit(uri)) except urllib2.HTTPError, e: if not e.code in proxy_callback_good_status: + logger.debug('Checking Proxy Callback URL {} returned {}. Not issuing PGT.'.format(uri, e.code)) return except urllib2.URLError, e: + logger.debug('Checking Proxy Callback URL {} raised URLError. Not issuing PGT.'.format(uri)) return pgt.save() diff --git a/setup.py b/setup.py index a88cbef..fe96615 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ def read(fname): setup( name='django-cas-provider', - version='0.3.1', + version='0.3.2', description='A "provider" for the Central Authentication Service (http://jasig.org/cas)', author='(Chris Williams), Sebastian Annies', author_email='(chris@nitron.org), sebastian.annies@googlemail.com',