Skip to content

Commit

Permalink
logging++
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Jan 21, 2021
1 parent 998dc07 commit 3e2ffe3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions DuetRRFOutputDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
8 changes: 6 additions & 2 deletions DuetRRFPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3e2ffe3

Please sign in to comment.