diff options
-rw-r--r-- | src/nbb.in | 13 | ||||
-rw-r--r-- | src/nbblib/bs.py | 4 | ||||
-rw-r--r-- | src/nbblib/vcs.py | 4 |
3 files changed, 17 insertions, 4 deletions
@@ -14,6 +14,19 @@ if sys.version_info < (2,4): print "Fatal: This program requires Python 2.4 or later." sys.exit(3) +import logging # since python 2.3 + +# funcName: Since python 2.5 +# format="%(filename)s:%(lineno)d:%(funcName)s:" +logging.basicConfig(level = logging.DEBUG, + format = "%(levelname)s: %(message)s", + stream = sys.stderr) +if False: + logging.debug("xxx debug") + logging.info("xxx info") + logging.warning("xxx warn") + logging.error("xxx error") + if __name__ == '__main__': pythondir = "@pythondir@" lib_found = False diff --git a/src/nbblib/bs.py b/src/nbblib/bs.py index ac09b97..70f4ee0 100644 --- a/src/nbblib/bs.py +++ b/src/nbblib/bs.py @@ -46,13 +46,13 @@ class BSSourceTree(object): """Find BS tree type and return it""" if len(cls.plugins) < 1: raise NoPluginsRegistered(cls) - logging.debug("CLASS %s", cls) + #logging.debug("CLASS %s", cls) matches = PluginDict() for key, klass in cls.plugins.iteritems(): try: t = klass(vcs_tree, context) if t.tree_root() == vcs_tree.tree_root(): - logging.debug("KLASS %s", klass) + #logging.debug("KLASS %s", klass) matches[key] = t except NotABSSourceTree, e: pass diff --git a/src/nbblib/vcs.py b/src/nbblib/vcs.py index 91c36c5..f9b7dd3 100644 --- a/src/nbblib/vcs.py +++ b/src/nbblib/vcs.py @@ -74,13 +74,13 @@ class VCSourceTree(object): """Detect VCS tree type and return object representing it""" if len(cls.plugins) < 1: raise NoPluginsRegistered(cls) - logging.debug("CLASS %s", cls) + #logging.debug("CLASS %s", cls) matches = PluginDict() for key, klass in cls.plugins.iteritems(): try: t = klass(srcdir, context) if t.tree_root() == srcdir: - logging.debug("KLASS %s", klass) + #logging.debug("KLASS %s", klass) matches[key] = t except NotAVCSourceTree, e: pass |