Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2003 09:05:08 +0000
From:      Wes Peters <wes@softweyr.com>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        arch@FreeBSD.ORG
Subject:   Re: syslog.conf syntax change (multiple program/host specifications)
Message-ID:  <200302150905.08387.wes@softweyr.com>
In-Reply-To: <p05200f1cba73875fbc8d@[128.113.24.47]>
References:  <20030210114930.GB90800@melusine.cuivre.fr.eu.org> <200302141733.29304.wes@softweyr.com> <p05200f1cba73875fbc8d@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 15 February 2003 06:48, Garance A Drosihn wrote:
> At 5:33 PM -0800 2/14/03, Wes Peters wrote:
> >Keywords are easier to parse than name=value pairs in this case.
> >How 'bout:
> >
> >lpr.info		/var/log/lpd-errs	256K
> >local3.*		/var/log/foo		new 1K
> >ftp.*			/var/log/ftp		bzip 1M
> >cron.*			/var/log/cron		rm
>
> Hmm.  If syslogd can call newsyslog, does it need bzip/gzip options?
> [I'm just wondering, I have no preference either way]

Yes.  The intention of this is to benefit embedded systems, and some of them 
might want to shed newsyslog completely.  We're not making that leap 
because we use newsyslog to rotate other files too, but I can see where 
others might want the feature.  The code is tiny, it adds a few hundred 
bytes to the text.

> >  > I'd also suggest that newsyslog be run with some (new?) option
> >>
> >>  that says "rotate this file, even if you don't think it needs
> >>  to be rotated".
> >
> >newsyslog doesn't really seen to have this feature; -F just
> >truncates the file.  I'll look into a proper "force" flag
> >for newsyslog.
>
> Based on a few minutes of testing, I think newsyslog will pretty
> much do the right thing if you call it as:
>
>       newsyslog -Fr /var/log/somefilename
>
> The '-r' is just so newsyslog doesn't turn around and send a
> signal back to syslogd.  I'm still tempted to add a '-R'.

I'll give that a try Tuesday, or maybe Monday if I get my current box 
running this weekend.

> >  > I'd expect newsyslog to know *how* to do the
> >>
> >>  rotation in this case (bzip, gzip, or alternate file-naming
> >>  conventions, and permissions on the newly-created log file).
> >
> >What should it do if told to newsyslog a file it is not
> >configured to handle?
>
> I would add some default rotate-action to newsyslog, which
> would be used if -R is specified and the file is not listed
> in the newsyslog.conf file.

Sounds good to me.  Are you going to look into that?  I'll definitely want 
your changes to newsyslog to go along with my changes to syslog.conf. ;^)

-- 

        Where am I, and what am I doing in this handbasket?

Wes Peters                                               wes@softweyr.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302150905.08387.wes>