#17 Logs aufgeräumt

This commit is contained in:
David Zingg 2020-01-16 17:32:39 +01:00
parent 9015fd16de
commit 48c283703d
2 changed files with 12 additions and 10 deletions

View File

@ -2,6 +2,7 @@
<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" /> <change beforePath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -47,13 +48,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1574193087583</updated> <updated>1574193087583</updated>
</task> </task>
<task id="LOCAL-00010" summary="#6 UI Updates senden und anzeigen">
<created>1574280753494</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1574280753494</updated>
</task>
<task id="LOCAL-00011" summary="#6 UI Updates senden und anzeigen"> <task id="LOCAL-00011" summary="#6 UI Updates senden und anzeigen">
<created>1574280882951</created> <created>1574280882951</created>
<option name="number" value="00011" /> <option name="number" value="00011" />
@ -390,7 +384,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1579190155814</updated> <updated>1579190155814</updated>
</task> </task>
<option name="localTasksCounter" value="59" /> <task id="LOCAL-00059" summary="#17 Logs aufgeräumt">
<created>1579190259362</created>
<option name="number" value="00059" />
<option name="presentableId" value="LOCAL-00059" />
<option name="project" value="LOCAL" />
<updated>1579190259362</updated>
</task>
<option name="localTasksCounter" value="60" />
<servers /> <servers />
</component> </component>
<component name="UnknownFeatures"> <component name="UnknownFeatures">
@ -443,6 +444,7 @@
<MESSAGE value="#15 Beschreibung erstellen" /> <MESSAGE value="#15 Beschreibung erstellen" />
<MESSAGE value="#16 Codereview Octoprint Plugin Repo" /> <MESSAGE value="#16 Codereview Octoprint Plugin Repo" />
<MESSAGE value="#17 Logging zur Fehleranalyse eingebaut" /> <MESSAGE value="#17 Logging zur Fehleranalyse eingebaut" />
<option name="LAST_COMMIT_MESSAGE" value="#17 Logging zur Fehleranalyse eingebaut" /> <MESSAGE value="#17 Logs aufgeräumt" />
<option name="LAST_COMMIT_MESSAGE" value="#17 Logs aufgeräumt" />
</component> </component>
</project> </project>

View File

@ -87,7 +87,7 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
intervall = timestamp - self.lastTimeStamp intervall = timestamp - self.lastTimeStamp
# Energy in Wh # Energy in Wh
self.energy = self.energy + (intervall * data["power"] / 3600) self.energy = self.energy + (intervall * data["power"] / 3600)
self._logger.info( self._logger.debug(
"Energy: " + str(self.energy) + " interval: " + str(intervall) + " power: " + str( "Energy: " + str(self.energy) + " interval: " + str(intervall) + " power: " + str(
data["power"])) data["power"]))
self.lastTimeStamp = timestamp self.lastTimeStamp = timestamp