misc: Add some extra info and debug statements.
[matthijs/projects/backupninja.git] / src / lib / backupninja / action.py
index 1ebc737cfdd76c7b0c176f175659128fd87e7a32..e110d933d2aa521cbc7b334f3ad2bb072c28758f 100644 (file)
@@ -33,7 +33,13 @@ def run_all_actions(opts, global_config):
     opts are the parsed commandline options, global_config is the parsed
     global configuration.
     """
-    actions = config.list_actions(opts)
+    log.info('Running all actions')
+    try:
+        actions = config.list_actions(opts)
+    except OSError, e:
+        log.critical('Unable to list actions: %s', e)
+        return
+
     actions.sort()
 
     for action in actions:
@@ -44,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):