Re: newsyslog(8) patch for both size and time checks

From: Tim Kientzle <kientzle_at_freebsd.org>
Date: Tue, 12 May 2009 15:29:36 -0700
Garance A Drosehn wrote:
> At 1:59 PM +0400 5/12/09, Dmitry Morozovsky wrote:
>>
>> for now, if log is configured to be rotated in time manner, its size 
>> is not checked ...
>>
>> The following simple patch should fix the problem. Any objection to 
>> commit this?
> 
> It would fix your problem, but it changes the behavior as is explicitly
> documented in  'man newsyslog.conf' .  There is a paragraph in the man
> page which makes it clear that if both fields are specified, then the
> log file will only be rotated if both conditions are true.

I've never liked that paragraph and find the
documented behavior is much less useful than the
proposed behavior.

With the documented behavior, the effect is "rotate
at this size, but no more often than XXX time interval",
which serves to limit the number of log files created,
but not the total size.  In practice, /var/log total
size is almost always the critical resource.

If compatibility is essential, perhaps we could
add a new flag to control this behavior.  (I would
argue for changing the default and providing a flag
to obtain the old behavior.)

Tim
Received on Tue May 12 2009 - 20:29:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:47 UTC