Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Mar 2002 18:54:58 -0500
From:      "alexus" <ml@db.nexgen.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   newsyslog/rotatelog
Message-ID:  <001301c1c30e$d4006a40$faa0b542@noc>

next in thread | raw e-mail | index | archive | help
sorry for previose post, clicked send email before finished writing...
so as i was saying...
---
hi

i'm trying to find best way to rotate my apache's logs
i found small utility that comes with apache


c# /usr/local/apache/bin/rotatelogs
Usage: /usr/local/apache/bin/rotatelogs <logfile> <rotation time in seconds>
[offset minutes from UTC]

Add this:

TransferLog "|/usr/local/apache/bin/rotatelogs /some/where 86400"

to httpd.conf. The generated name will be /some/where.nnnn where nnnn is the
system time at which the log nominally starts (N.B. this time will always be
a
multiple of the rotation time, so you can synchronize cron scripts with it).
At the end of each rotation time a new log is started.
c#

the only problem with this software is it creates some weird file names
log.64645645 and god knows what those numbers means..
i mean we do know it's system time.. but it's first inconvient to explain to
my users what this is and how to convert them to more understanble numbers
for them and in additon to that it doesn't compress them which was main
point of rotating so you can compress them ... plus this rotation stuff will
start coutning from the time you start apache.. i can't do it like too, i
need it like every monday or somethin or every 1st of the month ..

another problem that i bump into .. is webazlier (thats what i use for
statistics) i can't explain to webazlier to pick up file name log_* so it
picks first file, there for i can't really put it in crontab .. i need
original file to keep file name and the one it rotate (old log) rename it
and compress it and keep for let's say either 7 days period or month or
something like that..

i was thinkin to use newsyslog for that.. is it good idea? or there are some
other tools for that?
can i put "include /etc/apache-log-rotate.conf" into newsyslog.conf so i
dont have to edit it every time?

can someone suggest/recommend some thing here?

thanks in advance

alexus


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001301c1c30e$d4006a40$faa0b542>