[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modules
Subject:    Re: [apache-modules] file logging
From:       kurt () andover ! net
Date:       1999-09-04 15:54:10
[Download RAW message or body]



On Fri, 3 Sep 1999, Earl Quinones wrote:

> What would be the easiest/best way to rotate log files depending on
> either a given size or specified interval?
> 
> for example:  I would like to be able to start a new log file when
> access_log (or any other log)  reached 10 meg in size or at the start of
> each day....


I think the simplest approach would be to crontab a simple shell script as
root which runs every 10 minutes or so, checks the time and log file size,
renames the log to log.datestamp, then restarts the server daemon.

...but if you're trying to hack out an Apache module to do that, I
personally would not try to mess with rotating access_log from within an
Apache module unless it was via the standard ap_* API calls, and I don't
recall any ap_ functions that allow you to move access_log while the
server is processing requests -- I could be wrong since I haven't studied
the Aapche logging API functions in any depth.

--
----------------------------------------------------------------
Apache Modules Mailing List            631 currently subscribed
----------------------------------------------------------------

If you wish to be removed from this list, send the word
'unsubscribe' to: apache-modules-request@covalent.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic