From 3e2ffe3d9e6b52545a16f6eaaada2e6ec2635936 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Thu, 21 Jan 2021 22:18:20 +0100 Subject: [PATCH] logging++ --- DuetRRFOutputDevice.py | 3 +-- DuetRRFPlugin.py | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/DuetRRFOutputDevice.py b/DuetRRFOutputDevice.py index 3a12ba6..77e5d91 100644 --- a/DuetRRFOutputDevice.py +++ b/DuetRRFOutputDevice.py @@ -478,13 +478,12 @@ def _onProgress(self, progress): self.writeProgress.emit(self, progress) def _resetState(self): - Logger.log("d", "starting cleanup") + Logger.log("d", "called") if self._stream: self._stream.close() self._stream = None self._stage = OutputStage.ready self._fileName = None - Logger.log("d", "finished cleanup") def _onMessageActionTriggered(self, message, action): if action == "open_browser": diff --git a/DuetRRFPlugin.py b/DuetRRFPlugin.py index ea66d4f..f254980 100644 --- a/DuetRRFPlugin.py +++ b/DuetRRFPlugin.py @@ -55,12 +55,16 @@ def _check_unmapped_settings(self): Logger.log("d", str(e)) if self._found_unmapped: + Logger.log("d", "Unmapped settings found!") self.addMenuItem(catalog.i18n("Show unmapped settings..."), self._showUnmappedSettingsMessage) self.addMenuItem(catalog.i18n("Delete unmapped settings"), self._deleteUnmappedSettings) self._showUnmappedSettingsMessage() + else: + Logger.log("d", "No unmapped settings found.") def _showUnmappedSettingsMessage(self): - Logger.log("d", "DuetRRF showUpgradeMessage called.") + Logger.log("d", "called: {}".format(self._found_unmapped.keys())) + msg = ( "Settings for the DuetRRF plugin moved to the Printer preferences.\n\n" "Please go to:\n" @@ -95,7 +99,7 @@ def _showUnmappedSettingsMessage(self): message.show() def _deleteUnmappedSettings(self): - Logger.log("d", "DuetRRF deleteUnmappedSettings called: {}".format(self._found_unmapped.keys())) + Logger.log("d", "called: {}".format(self._found_unmapped.keys())) for printer_id in self._found_unmapped.keys(): delete_config(printer_id)