Logrotating single-issue files

Nicolas Mailhot Nicolas.Mailhot at laPoste.net
Mon Nov 10 11:12:48 UTC 2003


[re-sending as subscribed user ]

Hi,

	I'm battling with a few apps that create uniquely-named traces/logs in
a logdir (typically using PID / date or a sequence number as a unique
identifier). I naively though it might be possible to use logrotate to
compress old traces and remove them after a while.

	The problem is of course once the files have been rotated once nothing
will recreate the original files so they'll be stuck in first rotation
forever (of course one might tell logrotate to create empty new files
after compression but that means filling the disk with empty files -
plus gziped empty files are *not* zero-sized anymore).

	I've been trying various workarounds such as creating empty foo.x.gz
files in prerotate and removing them in postrotate but it seems
prerotate is not even entered when pattern files are not present. So I'm
stuck - it seems logrotate can not handle this case and I'll have to
cook up my own cron script.

	Anyone got an idea ? Is the modified SuSE logrotate some people have
been talking about able to cope with this ?

Cheers,

-- 
Nicolas Mailhot
-- 
Nicolas Mailhot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message num?riquement sign?e.
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20031110/b06ca4b4/attachment.sig>


More information about the fedora-devel-list mailing list