Forum Moderators: phranque

Message Too Old, No Replies

consolidated log files

         

blakmonk

8:46 pm on Apr 1, 2005 (gmt 0)

10+ Year Member



Hi all,

How can one consolidate apache server logs?

At least error_log ( usualy much less writing ).

here is the scenario:

I have several web webservers, all write to their own error_log file.

To trace errors, I have to check all the error_log files individualy.

What are my option for having all the servers write into a single error_log file?

</BlakMonk>

sitz

12:54 am on Apr 2, 2005 (gmt 0)

10+ Year Member



This (surprise!) really depends on how you're defining your terms. Does 'several webservers' mean:

  • several virtualhosts configured in the same httpd.conf
  • several instances of apache on the same machine
  • several physical machines

    The answers (in order) are:

  • configure each VirtualHost to use the same ErrorLog (or don't configure ErrorLog lines for *any* of them; the VirtualHosts will inherit the main server's ErrorLog line, and all VirtualHosts will log there

  • The easy answer is: If possible, consolidate the Apache instances into VirtualHosts on the same Apache instance, then implement the above. If this is not possible, see below.

  • Mmmm. multi-server farms. This gets tricky; Apache really isn't designed around this idea. I've seen modules which allow Apache to log *access* logs to a central SQL database, but I'm not aware of one for doing the same for ErrorLog; doesn't mean it doesn't exist, just means I'm not aware of one. The real answer will (surprise again!) depend on why you want to consolidate. Troubleshooting? Reporting? Something else?
  •