comparison MoinMoin/formatter/__init__.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 d2e9afd64276
children a48929a5036c
comparison
equal deleted inserted replaced
3106:af3dd2bc85cc 3107:c6e39279f83b
6 6
7 @copyright: 2000-2004 by Juergen Hermann <jh@web.de> 7 @copyright: 2000-2004 by Juergen Hermann <jh@web.de>
8 @license: GNU GPL, see COPYING for details. 8 @license: GNU GPL, see COPYING for details.
9 """ 9 """
10 import re 10 import re
11 import logging 11
12 from MoinMoin.server import getLogger
13 logging = getLogger(__name__)
14
15 # use this to temporarily and selectively enable debug logging for this module
16 #logging.setLevel(logging.DEBUG)
12 17
13 from MoinMoin.util import pysupport 18 from MoinMoin.util import pysupport
14 from MoinMoin import wikiutil 19 from MoinMoin import wikiutil
15 from MoinMoin.support.python_compatibility import rsplit 20 from MoinMoin.support.python_compatibility import rsplit
16 21
335 # attention: this is copied into text_python! 340 # attention: this is copied into text_python!
336 parser = wikiutil.searchAndImportPlugin(self.request.cfg, "parser", parser_name) 341 parser = wikiutil.searchAndImportPlugin(self.request.cfg, "parser", parser_name)
337 args = None 342 args = None
338 if lines: 343 if lines:
339 args = self._get_bang_args(lines[0]) 344 args = self._get_bang_args(lines[0])
340 #logging.debug("formatter.parser: parser args %r" % args) 345 logging.debug("formatter.parser: parser args %r" % args)
341 if args is not None: 346 if args is not None:
342 lines = lines[1:] 347 lines = lines[1:]
343 if lines and not lines[0]: 348 if lines and not lines[0]:
344 lines = lines[1:] 349 lines = lines[1:]
345 if lines and not lines[-1].strip(): 350 if lines and not lines[-1].strip():