I'm not sure if this is possible, and haven't had any success yet. I'm trying to log page generation times at the web server level and currently have this working for all requests with mod_log_config and this configuration:
LogFormat "%h %t %>s %b %T %D \"%r\" " timeformat
CustomLog /var/log/httpd/timing_log "timeformat"
That works, but is logging details for all requests, including static content like images, javascript, css, that I don't really care about.
Is there a way to log requests only if it was passed through PHP? The CustomLog directive has an optional third argument that can look at an environment variable to determine whether or not to log the request. I've tried looking at SetEnvIf to set that appropriately, but haven't come up with anything yet.
Suggestions?
I haven't done this, but the Conditional Logging section in the apache manual seems like a good starting point.