diff 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
line wrap: on
line diff
--- a/MoinMoin/formatter/__init__.py	Sat Feb 23 21:45:02 2008 +0100
+++ b/MoinMoin/formatter/__init__.py	Sat Feb 23 22:59:30 2008 +0100
@@ -8,7 +8,12 @@
     @license: GNU GPL, see COPYING for details.
 """
 import re
-import logging
+
+from MoinMoin.server import getLogger
+logging = getLogger(__name__)
+
+# use this to temporarily and selectively enable debug logging for this module
+#logging.setLevel(logging.DEBUG)
 
 from MoinMoin.util import pysupport
 from MoinMoin import wikiutil
@@ -337,7 +342,7 @@
         args = None
         if lines:
             args = self._get_bang_args(lines[0])
-            #logging.debug("formatter.parser: parser args %r" % args)
+            logging.debug("formatter.parser: parser args %r" % args)
             if args is not None:
                 lines = lines[1:]
         if lines and not lines[0]: