httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Neulinger <nn...@umr.edu>
Subject Re: suggestion for automatic log file rotation
Date Sat, 23 Nov 1996 20:32:33 GMT
>My question is what do people think of the suggestion?
>
>you need to take care of cases where people would want to use
>date stamped filenames but they don't rotate their logs wach day.
>
>e.g. there's a problem if someone uses this feature to name their
>logfiles but only rotates them once a week/month/etc, or even at an hour
>other than midnight. If the server is restarted on a different day, it'll
>insist on opening new logs when the intention was that it continued with
>the old ones.
>
>Renaming the logfiles when you're done with them is simple to do.

I personally don't see the big deal about processing the logs with another
utility.

I have something set up for all of our servers at our site that
periodically (hourly in some cases) shuffles the logs... Our setup
processes the logs into:

/some/dir/www.server.name:port/access-YYYY-MMM
/some/dir/www.server.name:port/error-YYYY-MMM

Those files are automatically gzipped, the log processor handles either case.

That central dir is then automatically processed into html files for the
stats. The data files can be removed with the stats html remaining.

There is no need to kill -HUP or do anything to the server, all you need to
do is null out the file. The next write by the server will pick up where it
left off. Basically, it just creates a file with a hole in it. This is not
really a problem, as the log processor will just skip over the nulls. (And
with some minor effort can be made to ignore the holes alltogether.)

It works well for us anyway.

-- Nathan

------------------------------------------------------------
Nathan Neulinger                  Univ. of Missouri - Rolla
EMail: nneul@umr.edu                  Computing Services
WWW: http://www.umr.edu/~nneul      SysAdmin: rollanet.org



Mime
View raw message