William A. Rowe, Jr. wrote: >>Joshua Slive wrote: >> >> >>>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >>>> >>>> >>>>ianh 02/01/09 17:03:41 >>>> >>>> Modified: modules/loggers mod_log_config.c >>>> docs/manual/mod mod_log_config.html >>>> Log: >>>> new option LogExcludeByType >>>> main use is so that you can ignore logging images >>>> >>>> >>>Hmmm... I'm pretty close to a -1 on this one. We were just discussing >>>simplifying the logging directives, while this will compilicate them for no >>>good reason. Can you justify why this is an improvement over >>>http://httpd.apache.org/docs/logs.html#conditional and >>>http://httpd.apache.org/docs/env.html#examples ? >>> >>>I guess the answer is mainly a speed one. >>> >>setenvif is a regex call while this isn't. >> > > > Ian... we should be compiling a -single- regex for this case, and > it should be precompiled. If we don't precompile SetEnvIf regexes, > that is the bug. > > I have no objection to such an 'example', commented out, in the config. > As for the mime types, it doesn't matter when setenvif runs, I actually > suspect that fixups is the correct place. Logging doesn't occur until > the bitter end. >
Thats true in this case. but changing the hook you run this against will break a lot of things which depend on the note being set before they are called. changing the hook to run AFTER these hooks in not going to work. so your stuff with running the reg-ex compare another time. Here's what the difference is in our config. (with ExcludeLog) ExcludeLog "image/gif image/jpeg image/png image/x-icon text/css" (you want the env var set if you want to log images from a certain location..say your Ad images) (without) SetEnvIF REQUEST_URI \.(gif|jpg|jpeg|png|ico)$ dontlog SetEnvIF REQUEST_URI \.css$ dontlog CustomLog logs/access_log env=!dontlog That is at least 2 regex compares x3 (for each hook), plus the potential of miss-configuring this. not to mention modules which actually set the mime-type not working. now the other problem with this is if you want to log images from a certain directory. you are now relying on the interaction of 'SetEnv' & 'SetEnvIF' and what order they are running. I'm going to benchmark the cost of doing 6 reg-ex's compared to a hash (just to be anal-retentive) (oh we do precompile them BTW) >
