James Cox wrote:
> 
> thus, to not log any status but 404 (ie, for a broken link log)
> 
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
> brokenlinks
> LogStatus "404, !*" brokenlinks
> CustomLog /var/log/httpd/brokenlinks_log brokenlinks

I personally find that a bit baroque. :-)  Also, it's tied
specifically to mod_log_config.  However, you've given me
an idea, so here's a counterproposal:

LogStatus envname[=val] statusre ...

as in

LogStatus status_is_redirect "^3.."
LogStatus status_is_success 200 206 304
LogStatus status_is_notfound 404
CustomLog logs/broken-links.log combined env=status_is_notfound

This would be handled by the core, and any appropriate envariables
would be set before any of the logging-phase hooks were called.
This way we make use of the existing conditional logging syntax,
the envariable concept, and make the facility available to other
logging modules than mod_log_config.
-- 
#ken    P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

Reply via email to