changeset 4882:c2002dd6019f

Changed from info messages to debug messages.
author Rowan Kerr <rowan@stasis.org>
date Fri, 22 May 2009 08:13:47 -0400
parents c27302ff6a67
children 6586038c07d3
files MoinMoin/auth/openidrp.py
diffstat 1 files changed, 14 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/auth/openidrp.py	Fri May 22 06:54:16 2009 -0400
+++ b/MoinMoin/auth/openidrp.py	Fri May 22 08:13:47 2009 -0400
@@ -5,7 +5,9 @@
     @copyright: 2007 MoinMoin:JohannesBerg
     @license: GNU GPL, see COPYING for details.
 """
-import logging
+from MoinMoin import log
+logging = log.getLogger(__name__)
+
 from MoinMoin.util.moinoid import MoinOpenIDStore
 from MoinMoin import user
 from MoinMoin.auth import BaseAuth
@@ -72,7 +74,7 @@
         # that they want to use on this wiki
         # XXX: request nickname from OP and suggest using it
         # (if it isn't in use yet)
-        logging.log(logging.INFO, "running _get_account_name")
+        logging.debug("running _get_account_name")
         _ = request.getText
         form.append(html.INPUT(type='hidden', name='oidstage', value='2'))
         table = html.TABLE(border='0')
@@ -138,19 +140,19 @@
                                         MoinOpenIDStore(request))
         query = {}
         for key in request.values.keys():
-            #logging.log(logging.INFO, key + "=" + request.values.get(key))
+            #logging.debug(key + "=" + request.values.get(key))
             query[key] = request.values.get(key)
         current_url = get_multistage_continuation_url(request, self.name,
                                                       {'oidstage': '1'})
         info = oidconsumer.complete(query, current_url)
         if info.status == consumer.FAILURE:
-            logging.log(logging.INFO, _("OpenID error: %s.") % info.message)
+            logging.debug(_("OpenID error: %s.") % info.message)
             return CancelLogin(_('OpenID error: %s.') % info.message)
         elif info.status == consumer.CANCEL:
-            logging.log(logging.INFO, _("OpenID verification canceled."))
+            logging.debug(_("OpenID verification canceled."))
             return CancelLogin(_('Verification canceled.'))
         elif info.status == consumer.SUCCESS:
-            logging.log(logging.INFO, _("OpenID success. id: %s") % info.identity_url)
+            logging.debug(_("OpenID success. id: %s") % info.identity_url)
             request.session['openid.id'] = info.identity_url
             request.session['openid.info'] = info
 
@@ -169,11 +171,11 @@
 
             # if no user found, then we need to ask for a username,
             # possibly associating an existing account.
-            logging.log(logging.INFO, "OpenID: No user found, prompting for username")
+            logging.debug("OpenID: No user found, prompting for username")
             #request.session['openid.id'] = info.identity_url
             return MultistageFormLogin(self._get_account_name)
         else:
-            logging.log(logging.INFO, _("OpenID failure"))
+            logging.debug(_("OpenID failure"))
             return CancelLogin(_('OpenID failure.'))
 
     def _handle_name_continuation(self, request):
@@ -225,15 +227,15 @@
         _ = request.getText
         oidstage = request.values.get('oidstage')
         if oidstage == '1':
-            logging.log(logging.INFO, _('OpenID: handle verify continuation'))
+            logging.debug(_('OpenID: handle verify continuation'))
             return self._handle_verify_continuation(request)
         elif oidstage == '2':
-            logging.log(logging.INFO, _('OpenID: handle name continuation'))
+            logging.debug(_('OpenID: handle name continuation'))
             return self._handle_name_continuation(request)
         elif oidstage == '3':
-            logging.log(logging.INFO, _('OpenID: handle associate continuation'))
+            logging.debug(_('OpenID: handle associate continuation'))
             return self._handle_associate_continuation(request)
-        logging.log(logging.INFO, _('OpenID: unknown continuation stage'))
+        logging.debug(_('OpenID: unknown continuation stage'))
         return CancelLogin(_('OpenID error: unknown continuation stage'))
 
     def _openid_form(self, request, form, oidhtml):