Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 1998 15:01:42 -0200 (EDT)
From:      Joao Carlos Mendes Luis <jonny@coppe.ufrj.br>
To:        danny@panda.hilink.com.au (Daniel O'Callaghan)
Cc:        jonny@coppe.ufrj.br, freebsd-hackers@FreeBSD.ORG
Subject:   Re: logrotate, a proposal
Message-ID:  <199802101701.PAA11416@gaia.coppe.ufrj.br>
In-Reply-To: <Pine.BSF.3.91.980210193656.294G-100000@panda.hilink.com.au> from Daniel O'Callaghan at "Feb 10, 98 07:40:40 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
#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



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