[pitivi] undo: Log the actions being done/undone



commit 16af149aba3f8f00ffb37340704f12edd7756f65
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri May 8 22:20:31 2020 +0200

    undo: Log the actions being done/undone

 pitivi/undo/undo.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/pitivi/undo/undo.py b/pitivi/undo/undo.py
index 3803fcbb..339afe2a 100644
--- a/pitivi/undo/undo.py
+++ b/pitivi/undo/undo.py
@@ -114,7 +114,7 @@ class FinalizingAction:
         raise NotImplementedError()
 
 
-class UndoableActionStack(UndoableAction):
+class UndoableActionStack(UndoableAction, Loggable):
     """A stack of UndoableAction objects.
 
     Attributes:
@@ -127,6 +127,7 @@ class UndoableActionStack(UndoableAction):
 
     def __init__(self, action_group_name, finalizing_action=None):
         UndoableAction.__init__(self)
+        Loggable.__init__(self)
         self.action_group_name = action_group_name
         self.done_actions = []
         self.finalizing_action = finalizing_action
@@ -144,6 +145,7 @@ class UndoableActionStack(UndoableAction):
 
     def _run_action(self, actions, method_name):
         for action in actions:
+            self.log("Performing %s.%s()", action, method_name)
             method = getattr(action, method_name)
             method()
         self.finish_operation()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]