From f8fa67a43d5bcecee2575ac468e07a2728c866ea Mon Sep 17 00:00:00 2001 From: David Zingg Date: Thu, 16 Jan 2020 16:55:55 +0100 Subject: [PATCH] #17 Logging zur Fehleranalyse eingebaut --- .idea/workspace.xml | 21 +++++++++------------ octoprint_mystromswitch/__init__.py | 3 --- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 88dbc24..eed680f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,10 +1,7 @@ - - - - + diff --git a/octoprint_mystromswitch/__init__.py b/octoprint_mystromswitch/__init__.py index 5239704..dce4c56 100644 --- a/octoprint_mystromswitch/__init__.py +++ b/octoprint_mystromswitch/__init__.py @@ -97,10 +97,8 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, self._plugin_manager.send_plugin_message(self._identifier, data) except (requests.exceptions.ConnectionError, ValueError) as e: self._logger.exception(e) - self._logger.info('Connection Error Host: {}, {}'.format(self.ip, e)) except Exception as exp: self._logger.exception(exp) - self._logger.info(exp.message) else: self._logger.info("Ip is None") @@ -148,7 +146,6 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, self._logger.exception(e) self._logger.info("Error during powerCycle Relais: " + str(e.message)) except Exception as exp: - self._logger.info("Exception aufgetreten: " + str(exp.message)) self._logger.exception(exp) nbRetry = nbRetry + 1