comparison MoinMoin/util/moinoid.py @ 3107:c6e39279f83b

refactor logging usage
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 23 Feb 2008 22:59:30 +0100
parents c81b9c983b1d
children a48929a5036c
comparison
equal deleted inserted replaced
3106:af3dd2bc85cc 3107:c6e39279f83b
3 3
4 @copyright: 2006, 2007 Johannes Berg <johannes@sipsolutions.net> 4 @copyright: 2006, 2007 Johannes Berg <johannes@sipsolutions.net>
5 @license: GNU GPL, see COPYING for details. 5 @license: GNU GPL, see COPYING for details.
6 """ 6 """
7 7
8 from MoinMoin import caching 8 from sha import sha
9 from random import randint
10 import time
11
9 from openid import oidutil 12 from openid import oidutil
10 from openid.store.interface import OpenIDStore 13 from openid.store.interface import OpenIDStore
11 from openid.association import Association 14 from openid.association import Association
12 from openid.store import nonce 15 from openid.store import nonce
13 import logging 16
14 from sha import sha 17 from MoinMoin import caching
15 from random import randint 18
16 import time 19 from MoinMoin.server import getLogger
20 logging = getLogger(__name__)
21
22 # use this to temporarily and selectively enable debug logging for this module
23 #logging.setLevel(logging.DEBUG)
17 24
18 # redirect openid logging to moin log 25 # redirect openid logging to moin log
19 def log(msg, level=0): 26 def log(msg, level=0):
20 logging.log(level, msg) 27 logging.log(level, msg)
21 28