#17 Logging zur Fehleranalyse eingebaut

This commit is contained in:
David Zingg 2020-01-16 16:55:55 +01:00
parent 4a0136317b
commit f8fa67a43d
2 changed files with 9 additions and 15 deletions

View File

@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="7e2e0eec-b22e-4d48-8f24-196d1ed9b51a" name="Default Changelist" comment=""> <list default="true" id="7e2e0eec-b22e-4d48-8f24-196d1ed9b51a" name="Default Changelist" comment="" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -48,13 +45,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1574193087583</updated> <updated>1574193087583</updated>
</task> </task>
<task id="LOCAL-00008" summary="#6 UI Updates senden und anzeigen">
<created>1574280301030</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1574280301030</updated>
</task>
<task id="LOCAL-00009" summary="#6 UI Updates senden und anzeigen"> <task id="LOCAL-00009" summary="#6 UI Updates senden und anzeigen">
<created>1574280534955</created> <created>1574280534955</created>
<option name="number" value="00009" /> <option name="number" value="00009" />
@ -391,7 +381,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1578941071143</updated> <updated>1578941071143</updated>
</task> </task>
<option name="localTasksCounter" value="57" /> <task id="LOCAL-00057" summary="#17 Logging zur Fehleranalyse eingebaut">
<created>1579188503178</created>
<option name="number" value="00057" />
<option name="presentableId" value="LOCAL-00057" />
<option name="project" value="LOCAL" />
<updated>1579188503178</updated>
</task>
<option name="localTasksCounter" value="58" />
<servers /> <servers />
</component> </component>
<component name="UnknownFeatures"> <component name="UnknownFeatures">

View File

@ -97,10 +97,8 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
self._plugin_manager.send_plugin_message(self._identifier, data) self._plugin_manager.send_plugin_message(self._identifier, data)
except (requests.exceptions.ConnectionError, ValueError) as e: except (requests.exceptions.ConnectionError, ValueError) as e:
self._logger.exception(e) self._logger.exception(e)
self._logger.info('Connection Error Host: {}, {}'.format(self.ip, e))
except Exception as exp: except Exception as exp:
self._logger.exception(exp) self._logger.exception(exp)
self._logger.info(exp.message)
else: else:
self._logger.info("Ip is None") self._logger.info("Ip is None")
@ -148,7 +146,6 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
self._logger.exception(e) self._logger.exception(e)
self._logger.info("Error during powerCycle Relais: " + str(e.message)) self._logger.info("Error during powerCycle Relais: " + str(e.message))
except Exception as exp: except Exception as exp:
self._logger.info("Exception aufgetreten: " + str(exp.message))
self._logger.exception(exp) self._logger.exception(exp)
nbRetry = nbRetry + 1 nbRetry = nbRetry + 1