rmclare445 / thermopi

Raspberry Pi thermostat
0 stars 1 forks source link

Needs operation and error logs #5

Closed rmclare445 closed 2 years ago

rmclare445 commented 2 years ago

It's been a long time coming. Needs error logs so that it can communicate problems without necessarily shutting down. Op logs would be good just because. Then of course there is a need to reorganize the state.log.

Op logs should be saved at the end of every day then deleted after a week. Maybe emailed out? That'd be cool.

rmclare445 commented 2 years ago

Op log entry example:


09:48:33 - Furnace on, room temp 67.5 09:53:19 - Nobody home, Furnace off, room temp 68.9 11:32:01 - Unable to retrieve location data 17:24:05 - Furnace on, room temp 67.3 17:38:11 - Furnace off, room temp 70.0 00:00:12 - Op log saved as log.ops_20220512, beginning new file log.ops_20220513

rmclare445 commented 2 years ago

Should redirect stderr to log.err

https://stackoverflow.com/a/1956228/9450063

rmclare445 commented 2 years ago

Done, I'd say. I'll create a separate issue for email forwarding.