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

Re: Followup: Syslog



On Thu, Apr 19, 2001 at 11:40:24AM -0700, John H. Robinson, IV wrote:
> On Thu, Apr 19, 2001 at 07:54:53PM +0200, Gerrit Pape wrote:
> > On Thu, Apr 19, 2001 at 09:06:51AM -0700, John H. Robinson, IV wrote:
> > > 
> > > a few things that are mildly annoying about multilog, 
> > [...]
> > >   *  there is no easy way to tell multilog to keep all logs
> > > 
> > >   *  i have not found a way to get it to automatically zip up an older
> > >      logfile.
> > >
> > Both can be done with multilog using a 'processor', see 
> > http://cr.yp.to/daemontools/multilog.html .
> 
> it seems thar the processor directive `!' only operates on ``current'',
> and it seems before it gets written. again, i have not toyed with it
> enough to figure it out (the default action suits my needs just fine)
> 
> > >   *  you cannot tell multilog when to rotate the logs. multilog rotates
> > >      per file size. so each multilog process may rotate at different times
> > >
> > What is bad about this?
> 
> nothing. its just mildly annoying if you want it to rotate via a cron job, so
> you can zip it up. (which the process directive may or may not be able
> to do. if someone knows how, i would be grateful if they could share
> with the group)
>
You can use a processor to keep all logs gzipped if you like without cron, a
sample /service/qmail-smtpd/log/run could be:
#!/bin/sh
exec setuidgid qmaill multilog t s100000 n2 \
	!'gzip > /tmp/qmail-smtpd-`echo|tai64n`.gz' ./main

multilog will leave /tmp/qmail-smtpd-@*.gz alone.
But limiting logs to file size is a nice feature...

Gerrit.

-- 
pape@innominate.com
                                                        innominate AG
                                                 the linux architects
tel: +49.30.308806-0  fax: -77              http://www.innominate.com



Reply to: