RE: [squid-users] Tracking Log's

From: Navarro, Sebastian <SNavarro@dont-contact.us>
Date: Mon, 26 Mar 2001 11:51:53 -0300

If you just want to move it, and e-mail it to a mail box account, you can
make this little shell script.
(here a made it for linux OS)

#/bin/bash
DATE=`/bin/date +%d-%m-%y`
SQUID_ACCESS_FILE=/usr/local/squid/logs/access.log
NEW_SQUID_ACCESS_FILE=/usr/local/squid/logs_olds/access.$DATE.log
TEMP_NEW_SQUID_ACCESS_FILE=squid-log.$DATE

start() {
/bin/mv $SQUID_ACCESS_FILE $NEW_SQUID_ACCESS_FILE
/bin/echo "" > $SQUID_ACCESS_FILE

uuencode $NEW_SQUID_ACCESS_FILE $TEMP_NEW_SQUID_ACCESS_FILE | mail
snavarro@unifon.com.ar -s Log of the date $DATE
}
start >> /var/log/squid-rotation.log

and that's all.. a very simple rotation log script..

bye

Sebastian

-----Mensaje original-----
De: John Paul Szkudlapski [mailto:johns@birkenhead6th.mernet.org.uk]
Enviado el: Lunes 26 de Marzo de 2001 11:29
Para: squid-users@squid-cache.org
Asunto: [squid-users] Tracking Log's

Hi there, don't really know wether or not this is the place to ask, seeing
as how it is more of a mail thing!, but what i would like to do is: -

every night set up a job to mail out the access.log for squid to an e-mail
account on the box??,

and seeing as how the access.log file gets VERY BIG, very quickly, I would
like to copy it into another directory and replace it with a blank one...

I have seen this on a web site before,,,,anyone ever done that before or is
it not viable.

John
Received on Mon Mar 26 2001 - 07:52:39 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:58:52 MST