From ab619eb6bb706d95a3a9cfb48f3f8dc770ab599c Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 16 Jun 2008 16:37:10 -0300 Subject: [PATCH 1/1] Add logging to pymin.service module (refs #27). --- pymin/service/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pymin/service/__init__.py b/pymin/service/__init__.py index 1828fb4..9de5b96 100644 --- a/pymin/service/__init__.py +++ b/pymin/service/__init__.py @@ -1,17 +1,22 @@ # vim: set encoding=utf-8 et sw=4 sts=4 : import imp +import logging ; log = logging.getLogger('pymin.service') class LoadError(ImportError): pass def load_service(name, search_paths): + log.debug('load_service(%s, %r)', name, search_paths) try: (fp, path, desc) = imp.find_module(name, search_paths) except ImportError: raise LoadError('module "%s" not found' % name) + log.debug('load_service() -> find_module() returned %r', (fp, path, desc)) try: + m = imp.load_module(name, fp, path, desc) + log.debug('load_service() -> loaded module %r', m) return imp.load_module(name, fp, path, desc) finally: if fp: -- 2.43.0