The Vera Community forums have moved!

Advanced => Programming => General => Topic started by: denix on December 15, 2008, 06:22:54 pm

Title: Logrotate improvement
Post by: denix on December 15, 2008, 06:22:54 pm
Looking into how Vera handles logs, I noticed that they are rotated only based on time - 10 (?) minutes per file, 10 files max.

As a confirmation to that, I've seen MCV requesting people to call/IM within couple hours of failure to be able to catch it in the logs.

Sometimes it's helpful to see old logs, but couple hours window is not too much when you debug something.

There are few ways to improve it. Besides normal rotation by size (let's say logs are only rotated when the file reaches 100KB), it is also common to avoid rotating empty logs. So, if there was no activity for hours, last log file will be empty and you'd still have some logs saved from the last activity.

I guess if sources were available, I could have looked into fixing this myself...
Title: Re: Logrotate improvement
Post by: micasaverde on December 16, 2008, 05:18:33 pm
Actually the source is on Vera itself.  It's not compiled code: /usr/bin/Rotate_Logs.sh

I made a bug report so we'll be sure to take into account your suggestions: http://bugs.micasaverde.com/view.php?id=337