Logrotating single-issue files

Nicolas Mailhot Nicolas.Mailhot at laPoste.net
Mon Nov 10 19:44:01 UTC 2003


Le lun 10/11/2003 à 20:24, Keith Lofstrom a écrit :
> Nicolas Mailhot writes:
> 
> >   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.
> 
> ...
> 
> >   Anyone got an idea ? Is the modified SuSE logrotate some people have
> > been talking about able to cope with this ?
> 
> The SUSE modified logrotate takes an original and appends one date extension
> (YYYYMMDD) then tosses it after a while.  Not what you are dealing with.
> 
> Logrotate is probably not the proper tool.  You may be able to use a pair
> of "find ... exec ..." commands in a shell script called by cron to do
> what you want.  While you might build some ugly scripts and call them
> from logrotate, the next maintainer will have no idea where the behavior
> is coming from - logrotate is expected to do only certain things.  

I was seriously considering this way, right. I got logrotate to work but
it's way too ugly.

The downside of it is when you write custom scripts nobody enhances them
for you and the next user won't know where to find them :( (plus you
don't have the nice logrotate config interface). It's really sad the
logrotate authors seem to have forgotten/ignored this case. I started
because I app crashed a system filling up the disks with unhandled
traces, and I've already identified two other apps which behave the same
way:(

Regards,

-- 
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/4bf586ef/attachment.sig>


More information about the fedora-devel-list mailing list