tomhartley / AirPi

a Raspberry Pi weather station
351 stars 139 forks source link

added log.py logging plugin. #9

Open SpaceTrucker2196 opened 10 years ago

SpaceTrucker2196 commented 10 years ago

This plugin was created with the intention of logging sensor data to splunk. File is in json format with unit names omitted.

Sample: {"time":"2014-01-05 10:21:59.222526","Temperature":"22.5","Pressure":"977.52","Relative_Humidity":"26.3999996185","Light_Level":"2884.13098237","Smoke_Level":"31585.7142857","Nitrogen_Dioxide":"19312.3209169","Carbon_Monoxide":"675000.0",}

argysamo commented 7 years ago

Hey @jkunzelman. I like the idea of logging observations to a file. However, I would like it even more, if you considered the case of .log growing very big (i.e. rendering it inaccessible). I would check the file size, and if it exceeded a certain threshold I would zip it and write observations to a new one. Thanks for the great contribution.