From owner-freebsd-hackers Tue Feb 10 09:02:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA28617 for hackers-outgoing; Tue, 10 Feb 1998 09:02:16 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from gaia.coppe.ufrj.br (cisigw.coppe.ufrj.br [146.164.5.200]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA28554 for ; Tue, 10 Feb 1998 09:01:54 -0800 (PST) (envelope-from jonny@coppe.ufrj.br) Received: (from jonny@localhost) by gaia.coppe.ufrj.br (8.8.8/8.8.8) id PAA11416; Tue, 10 Feb 1998 15:01:42 -0200 (EDT) (envelope-from jonny) From: Joao Carlos Mendes Luis Message-Id: <199802101701.PAA11416@gaia.coppe.ufrj.br> Subject: Re: logrotate, a proposal In-Reply-To: from Daniel O'Callaghan at "Feb 10, 98 07:40:40 pm" To: danny@panda.hilink.com.au (Daniel O'Callaghan) Date: Tue, 10 Feb 1998 15:01:42 -0200 (EDT) Cc: jonny@coppe.ufrj.br, freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG #define quoting(Daniel O'Callaghan) // I wanted to do a bit more with logrotate than just rotate to .0, .1 etc. // I'd like it to accept a strftime(3) format for the extension, along the // lines of e.g. 'date +%h'. Would you like to look into adding this facility? Just occurred to me: What should happen if somebody specifies a date format that have a limit on count and a count bigger than this limit ? For example, %h and a count of 20. Worst, how would I know from the format how to "walk" through the old logs and select the older one to delete ? I cannot believe in the file date for this. Also, strftime needs a date as an argument. Which date would I feed into logrotate ? You don't have this problem in the script for wtmp rotating because 1) it does not delete old files, just overwrites them 2) it's always called at the first day of the month, so "yesterday" is the reference month. Maybe it's better not add such a feature in logrotate, and leave only numeric extensions. (This does not mean I've changed my mind about newsyslog and logrotate needing to be fully rewritten) Jonny -- Joao Carlos Mendes Luis jonny@gta.ufrj.br +55 21 290-4698 jonny@coppe.ufrj.br Universidade Federal do Rio de Janeiro UFRJ/COPPE/CISI PGP fingerprint: 29 C0 50 B9 B6 3E 58 F2 83 5F E3 26 BF 0F EA 67 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe hackers" in the body of the message