jbrusey / cogent-house

Cogent House is a system for sensing temperature, humidity, CO2, Air Quality, VOC, hot water consumption, and electricity consumption within the home. It has been developed by the [http://cogentcomputing.org Cogent Computing Applied Research Centre] at Coventry University. Cogent House is developed using TinyOS and Python.
4 stars 2 forks source link

Rotate log files (push.log & BaseLogger.log). Keep last 30 days' log. #103

Closed honir closed 6 years ago

jbrusey commented 6 years ago

can you provide some background on this? why is it needed? Is the change well tested?

honir commented 6 years ago

Rotating log files can be considered good practice. For long term deployments the logs can get very large. Particularly the debug push.log. This makes it harder to download the log files for inspection.

For infrequent data push (e.g. once an hour) this is less of an issue, but I am pushing every 5 minutes, so the push log grows at the rate of 2.5 MB per day.

If you wish to keep longer you could change

rotate 30
daily

to

rotate 30
weekly

to keep 6 months' worth of logs. (And which may be more appropriate with a 60 minute push regime?)

Currently live in my research deployments.