httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <>
Subject Re: [PATCH] Disabling logging based on envariable
Date Fri, 15 Aug 1997 15:27:30 GMT
On Fri, 15 Aug 1997, Rodent of Unusual Size wrote:

>     A while ago I suggested that we rm mod_log_agent and
>     mod_log_referer, but Rob pointed out that the latter had
>     functionality that mod_log_config lacked: the ability to selectively
>     *not* log based upon the value of the Referer header field.
>     Okey, here's a patch to mod_log_config that addresses that and a
>     whole lot more.  It adds the "DoNotLogIf" directive, with the syntax
>      DoNotLogIf env=some_envariable

Does that stop *all* logging ?, if so, then that's not what we need,
we need to say "don't log to this file if env=something"

>     (I'm not happy with the directive name; suggestions welcome.)

Assuming this patch doesn't disable logging to specific logs, how about
something like this..

	LogFormat "%h - %u %t \"%r\" %s %b"
	LogUnless env=that_bloody_robot_again

	CustomLog logs/kaboom "%h - %u %t \"%r\" %s %b \"\" \"%{User-agent}i\""
	LogIf status>=500

	CustomLog logs/referer "%{referer}i -> %U"
	LogIf env=referer_exists
	LogUnless env=referer_is_not_local

Rob Hartill                              Internet Movie Database (Ltd)   .. a site for sore eyes.

View raw message