Subject: Log rotation

From: Bruce R Miller <[email-masked]>
Date: Tue, 31 Aug 1999 19:34:11 -0400

Hello all;
  I'm trying to set up daily rotation of wu-ftp's xferlog.
The landfield website shows an example script, processlog, that
does this by
  cat $xferlog >> $newfile
  rm $xferlog
  touch $xferlog
I was under the impression that this was an unsafe approach,
since ftpd keeps xferlog open for relatively long periods
(? at least through each ftp session, if I've understood the code).
So it seems you're likely to either loose entries, or end up
with a log full of \0's
  --- or have I misunderstood something?

Is there a way to setup wu-ftp to pipe xferlog to another program,
as with apache? or some other recommended approach?

Thanks

--
[email-masked]
http://math.nist.gov/~BMiller/

---

From: "Marson, Hamish N" <[email-masked]>
Date: 31 Aug 1999 23:37:49 Z

Try just an 

xferlog=whatever
newfile=xferlog.`$date +"%Y%m%d"`
mv $xferlog $newfile

Assuming that you're moving to the same filesystem... If ftpd has it open it will keep writing until it closes. Then next time it will start a new ferlog file for you. A week or so later (a couple of days?) you can move the oldlogfiles to an archive filesystem, delete them whatever.

H

[email-masked] on 31/08/99 23:29:00
To:	wu-ftpd
cc:	
bcc:	Hamish N Marson
Subject:	Log rotation

Reply-To: [email-masked]@INTERNET

Hello all;

Thanks