httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Pierce <ch...@onyxsys.net>
Subject splitlogs <new app>
Date Wed, 01 Aug 2001 23:14:02 GMT
I'm new to the list, so I don't quite know the procedure for doing this
<or even if this is the right list for this>, but I have attached a
program that I think the apache community could benefit from.  The
program is self reliant, and will split the apache log files on the fly
(it will also rotate the logs).

----
History:
  Our web site is huge.  It has one domain and a BUNCH of sub
directories.  Each sub directory needed to act as a separate "virtual
host".  Because I couldn't have the customelog or transferlog within a
<directory> I created this app.  It allows me (using the <directory>
tags) to create a sub directory in www.mycompany.com/subdir and have
it's own logfile.


----
Usage: splitlogs [OPTIONS]... DEFAULT...

  Where OPTIONS can be FILE:DIRECTORY:ROTATION or FILE:DIRECTORY

  DEFAULT is in the format FILE:ROTATION or FILE

    The FILE is the path and name of the actual logfile.  The DIRECTORY
    is the directory you want split into a separate file.  The ROTATION
    is the system time at which the log will be rotated.  If no
    ROTATION time is given, the log will not be rotated and the file
    name will remain unchanged. If rotation is used, the log file will
    be in the format: FILE.2001_Aug_01_17:55.log


Installation:
  Add the following to the httpd.conf:

TransferLog "| splitlogs log-A:/A:86400 log-B:/B log-def


Note: If you have the two directories /a and /a/b, make sure to place
      the /a/b before /a.  Otherwise all of the /a/b requests would
      end up in the wrong logfile.

-- 
Chuck Pierce                Phone: (615) 253-5634
Sr. Systems Administrator   Pager: (888) 569-8085
State TN, OIR/Finance         Fax: (615) 741-7341
Mime
View raw message