[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Logrotating single-issue files



[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

Attachment: signature.asc
Description: Ceci est une partie de message=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]