From: Matthijs Kooijman Date: Thu, 10 Jun 2010 07:11:32 +0000 (+0200) Subject: misc: Add some extra info and debug statements. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=52ce78d1bf9e1344b9fc27cae81c158580579b34;p=matthijs%2Fprojects%2Fbackupninja.git misc: Add some extra info and debug statements. --- diff --git a/src/lib/backupninja/action.py b/src/lib/backupninja/action.py index 66fc5f3..e110d93 100644 --- a/src/lib/backupninja/action.py +++ b/src/lib/backupninja/action.py @@ -33,6 +33,7 @@ def run_all_actions(opts, global_config): opts are the parsed commandline options, global_config is the parsed global configuration. """ + log.info('Running all actions') try: actions = config.list_actions(opts) except OSError, e: @@ -49,6 +50,7 @@ def run_action(action, opts, global_config): Run a single action. opts are the parsed commandline options, global_config is the parsed global configuration. """ + log.info('Running action "%s"', action) # Split the action filename parts = action.split('.', 2) if (len(parts) < 2): diff --git a/src/lib/backupninja/handlers/__init__.py b/src/lib/backupninja/handlers/__init__.py index 990c471..7603afd 100644 --- a/src/lib/backupninja/handlers/__init__.py +++ b/src/lib/backupninja/handlers/__init__.py @@ -50,12 +50,14 @@ def create_handler(ty, conf): modname = 'backupninja.handlers.%s' % ty # Load the handler if it is not loaded yet if not modname in sys.modules: + log.debug('Loading handler for type "%s"', ty) try: __import__(modname, globals(), locals(), []) except ImportError, e: # Add some extra info, since the default exception does not # show the full module name. raise ImportError('Cannot load module %s: %s' % (modname, e)) + log.debug('Loaded handler for type "%s" from "%s"', ty, sys.modules[modname].__file__) # Get the module from the module table module = sys.modules[modname]