I have the following lines pertaining to logging in my Apache vhost file
SetEnvIf Request_URI "^/server-status$" dontlog SetEnvIf Request_URI "^/haproxy-status$" dontlog SetEnvIf Request_Method "OPTIONS" dontlog CustomLog /var/log/apache2/access_log combined env=!dontlog #ErrorLog /var/log/apache2/error_log #Remote logging -- handle by syslog ErrorLog "|logger -p local3.info -t httperror" CustomLog "|logger -p local3.info -t http" combined env=!dontlog LogLevel warn I don't really want to mess anything up as to where I won't be getting my logs properly, but I don't want to see duplicate lines for every entry either. Currently, If I make one request, I see one line for Apache, then one line which I assume is haproxy forwarding it to my app, similar to this:
aa.bbb.ccc.dd - - [05/Oct/2010:02:29:51 +0000] "GET /the_url HTTP/1.1" 200 4 "-" "-" eee.fff.gg.hh - - [05/Oct/2010:02:29:51 +0000] "GET /the_url HTTP/1.1" 200 4 "-" "-" aa.bbb.ccc.dd - - [05/Oct/2010:02:31:03 +0000] "GET /another_url HTTP/1.1" 200 4 "-" "-" eee.fff.gg.hh - - [05/Oct/2010:02:31:03 +0000] "GET /another_url HTTP/1.1" 200 4 "-" "-" What should I do to prevent this?