While at ApacheCon I am working on getting a patch for log file rotation and 
would like to get some feed back.

With the current patch, see link below, it changes the syntax to ErrorLog to 
this:

  ErrorLog file-path|syslog[:facility] [rotating[:<interval>]]

examples:

  ErrorLog "logs/error_log" rotating

  ErrorLog "logs/error_log" rotating:30

This enables rotation check to be preformed on the error log and allows 
changing of the check interval from the default 60 seconds.

The patch is using functionality from apr trunk and adds a new set function for 
the interval.

I still need to work out the CustomLog and TransferLog, I am thinking like this:

  CustomLog file|pipe format|nickname [env=[!]environment-variable] 
[rotating[:<interval>]]

There is one security issue that people may have a problem with in that the 
directory path for the log file has to be writeable by the User that apache 
drops privilege to.  This is because all the children will need to re-open the 
log file and the first one will create it.

This is all based on http-trunk and apr-trunk and will need to be split up, 
just looking for feed back.

If this does get accept, what are the chances of getting it in to 2.4 and the 
rotation code back ported to apr-1.5?

Brian

http://www.brianfrance.com/software/apache/rotate.diff


Reply via email to