From owner-freebsd-arch Fri Feb 14 20: 4:16 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B58D837B401; Fri, 14 Feb 2003 20:04:14 -0800 (PST) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E535E43F93; Fri, 14 Feb 2003 20:04:13 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.7/8.12.7) with ESMTP id h1F44CeY006563; Fri, 14 Feb 2003 23:04:12 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <200302141733.29304.wes@softweyr.com> References: <20030210114930.GB90800@melusine.cuivre.fr.eu.org> <200302141100.23529.wes@softweyr.com> <200302141733.29304.wes@softweyr.com> Date: Fri, 14 Feb 2003 23:04:11 -0500 To: Wes Peters , Thomas Quinot , Gordon Tetlow From: Garance A Drosihn Subject: Re: syslog.conf syntax change (multiple program/host specifications) Cc: Thomas Quinot , arch@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-RPI-Spam-Score: -1.9 () IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SIGNATURE_SHORT_DENSE,SPAM_PHRASE_01_02 X-Scanned-By: MIMEDefang 2.28 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 5:33 PM -0800 2/14/03, Wes Peters wrote: >On Friday 14 February 2003 12:17, Garance A Drosihn wrote: > > Something like 'max=256m', 'rotate=newsyslog' and 'rotate=rm'. >> Or I guess it should be something like 'rotate=trunc', so you >> don't have to deal with permissions on a newly-created log file. > >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 Well, how about keep the size specification as you have it, but have keywords which just happen to include '=' sign in them? 'atfull=newsyslog', 'atfull=bzip', 'atfull=rm'. Still use a simple strncmp() to do the check, but something that would be a bit more obvious to someone seeing it (in the syslog.conf file) for the first time. Also, that way it's less likely to conflict with any other cool ideas that some other OS adds to syslog.conf. I'm not thrilled with 'atfull'. Maybe 'rotate' or something. > > 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. Hmm. Well, I should do something more than just annoy you with requests of things to do. I have some other stuff to do this weekend (stuff for my real job), but I'll see if I can come up with some update for the newsyslog side of things. > > 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? Some simple default action. "just rotate, keep 2 backups", or something. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message