Permalink
Browse files

Register appengine-specific logging function with OpenID library.

  • Loading branch information...
1 parent 0ca4696 commit 5a75f984a781c466fcbc4dd553a7dc6375b5bec6 @bradfitz committed Mar 21, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 openid/consumer/consumer.py
@@ -190,9 +190,11 @@
import cgi
import copy
+import logging
from urlparse import urlparse, urldefrag
from openid import fetchers
+from openid import oidutil
from openid.consumer.discover import discover, OpenIDServiceEndpoint, \
DiscoveryFailure, OPENID_1_0_TYPE, OPENID_1_1_TYPE, OPENID_2_0_TYPE
@@ -213,6 +215,14 @@
]
+def appEngineLoggingFunction(message, level=0):
+ # Level is unused.
+ logging.info(message)
+
+
+oidutil.log = appEngineLoggingFunction
+
+
def makeKVPost(request_message, server_url):
"""Make a Direct Request to an OpenID Provider and return the
result as a Message object.

0 comments on commit 5a75f98

Please sign in to comment.