[IRCServices] Rotate Log function - performance

Andy Smith andy at strugglers.net
Tue Feb 27 00:16:01 PST 2001


On Mon, 26 Feb 2001 21:57:30 -0000, "Mark Hetherington"
<markh at eurodltd.co.uk> wrote:

>I am considering adding a rotate log function to services (and to the ircd
>but that is beyond the scope of this list) which will automatically rotate
>the log each day at Midnight but am looking for a low/no performance impact
>determination that Midnight has occured.

Not a complete solution but just a suggestion:

Does it really matter to you if it is exactly midnight?

Surely you can simply check that it is the "next day" and the log has not
yet been rotated?  This then will allow you to rotate the log as close to
midnight as you wish without needing to run something every second.

I just think for the purposes of log rotation, a few minutes either way is
not going to matter to you.

-- 
Andy Smith <andy at strugglers.net>