From owner-freebsd-stable Fri Jul 6 18:54:17 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail.halplant.com (24-168-203-47.wo.cox.rr.com [24.168.203.47]) by hub.freebsd.org (Postfix) with ESMTP id CCFD337B401 for ; Fri, 6 Jul 2001 18:54:13 -0700 (PDT) (envelope-from A.J.Caines@halplant.com) Received: by mail.halplant.com (Postfix, from userid 1001) id 7D4B91FBA; Fri, 6 Jul 2001 21:54:02 -0400 (EDT) Date: Fri, 6 Jul 2001 21:54:02 -0400 From: Andrew J Caines To: freebsd-stable@FreeBSD.ORG Subject: Re: Suggestion for newsyslog.c Message-ID: <20010706215402.E401@hal9000.servehttp.com> Reply-To: Andrew J Caines Mail-Followup-To: freebsd-stable@FreeBSD.ORG References: <5.1.0.14.2.20010706204719.021f8540@216.67.14.69> <200107070131.SAA208868@blah.incyte.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107070131.SAA208868@blah.incyte.com>; from bl@incyte.com on Fri, Jul 06, 2001 at 06:31:03PM -0700 Organization: H.A.L. Plant X-Powered-by: FreeBSD 4.3-STABLE X-PGP-Fingerprint: C59A 2F74 1139 9432 B457 0B61 DDF2 AA61 67C3 18A1 Importance: Normal Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG For the record, as someone who is paid to use Solaris, whose newsyslog is the equivalent of banging two rocks together, FreeBSD's newsyslog is fantastic. > Suggested optional feature for newsyslog.c is to enable timestamp (or > similar) in the renamed files. Since no single naming scheme is going to satisfy more than a few, how about a configurable expression incorporating date values in strftime(3), as used by date(1), incorporating file paths. For example, using %f for the log filename (conveniently not used by date), a field such as /archive/%b/%d/%f would save /var/log/messages as /archive/Jul/06/messages, whereas just %b/%d/%f would save it as /var/log/Jul/06/messages and %f.%a would save it as messages.Fri. A default of - would behave as it does now. While this sounds ambitious, I would hope that code could be swiped from date(1) and/or other utilities and incorporated without great difficulty. At a pinch, you could just call date. Since I'm no coder, I'll happily test. Oh, while you're at it, how about doing it in perl so I can slap it on my Solaris boxes? -Andrew- -- ______________________________________________________________________ | -Andrew J. Caines- Unix Systems Engineer A.J.Caines@halplant.com | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message