From 85a7560e8436d745d04ff37f3e3b528052e82857 Mon Sep 17 00:00:00 2001 From: jdegenstein Date: Sat, 17 Sep 2022 21:45:15 -0500 Subject: [PATCH] Add logging to CQ-Editor console --- cq_editor/main_window.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cq_editor/main_window.py b/cq_editor/main_window.py index abe00a0..04ddef6 100644 --- a/cq_editor/main_window.py +++ b/cq_editor/main_window.py @@ -267,17 +267,19 @@ class MainWindow(QMainWindow,MainMixin): def prepare_console(self): + from logbook import Logger console = self.components['console'] obj_tree = self.components['object_tree'] - + #application related items console.push_vars({'self' : self}) #CQ related items console.push_vars({'show' : obj_tree.addObject, 'show_object' : obj_tree.addObject, - 'cq' : cq}) - + 'cq' : cq, + 'log' : Logger(self.name).info}) + def fill_dummy(self): self.components['editor']\