Welcome to End Point’s blog

Ongoing observations by End Point people

Custom apache log to only show html requests

Today while working on an AJAX issue for I came across a need to only see HTML requests to Apache while leaving out all of the many requests for images, css, and js files. This would make it quite easy to see when AJAX requests were making it through properly.

I found the following solution which worked well:

I used these settings in our development httpd.conf:

SetEnvIf Request_URI "(\.html|\.shtml)$" html
CustomLog logs/html.log common env=html

No comments: