newsyslog(8) patch for both size and time checks
Mel Flynn
mel.flynn+fbsd.current at mailing.thruhere.net
Wed May 13 19:57:42 UTC 2009
On Wednesday 13 May 2009 00:29:36 Tim Kientzle wrote:
> 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.
I rotate maillogs on not so busy machines using this functionality. The
reasoning behind it is that I keep a limited number of logs available and if
for some reason the machine starts spewing a lot of mail, I still want to know
when it started. I also don't see the point of compressing/rotating 1-10 lines
if the machine only sends out the periodic mails, hence this works peachy.
> 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.)
Fine on the flag, maybe mergemaster could be a little more assisting in this
case, since I'm not looking forward to "just adding a flag". Like mergemaster
-p could auto-upgrade the lines that have both columns with values?
--
Mel
More information about the freebsd-current
mailing list