Forum Moderators: phranque

Message Too Old, No Replies

Big workload for apache to write logfiles?

Want to have a separate and overall logfile for subdomains

         

AcsCh

7:58 am on May 22, 2005 (gmt 0)

10+ Year Member



We run a domain with many subdomains, but would like to have the stats detailed per subdomain, but too an overall view of the full domain.
Just adding in all VirtualHosts 2 Custom log entries, one for a SubDomain Log, one for the Overall.Log seems to do the job.

Is there some "better" solution, or is this double writing insignificant load on apache?

jdMorgan

4:15 pm on May 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A standard approach is to add the server name to all lines in a single overall log file, and then use a cron job to sort the entries for each server into separate log files based on that server name, but only once a day (or hour, etc.). This means that the extra load only occurs when the cron job runs, and much reduces the workload on the server.

You trade real-time stats for a big reduction in workload.

The details are covered in the Apache documentation, so I won't reiterate them here.

Jim