newsyslog(8) patch for both size and time checks
kientzle at freebsd.org
Tue May 12 22:29:39 UTC 2009
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
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.)
More information about the freebsd-current