httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Nerad <>
Subject How to Not Log Something: (was Re: not logging myself)
Date Tue, 02 Jul 2002 14:33:46 GMT
Timothy J. Luoma wrote:

>I have a relatively static IP.
>I would like to have my browser stats, etc in the logs automatically
>ignore hits from my own machine.
>Is there an easy way to do this?  I tried googling but wasn't able to get
>on-topic results.
There are a bunch of different ways to not log something.  The easiest 
to understand is setting an environment variable that means something to 
your logging directive.

Something like this should do:

SetEnvIf Remote_Addr  "^my\.ip\.address$" dont_log=1

There are several request headers that you can use to set the "dont_log" 
flag [1].

And then  the logging directive [2]

CustomLog logs/access_log common env=!dont_log

The exclamation mark (bang) interprets as "not".

Of course, most acceptable logfile analysis packages will allow you to 
ignore requests based on a wide range of criteria.  Filtering by logfile 
analysis packages is probably the superior method because you don't lose 
information if someone should break into your machine and try to do 
something funny on your webserver.  Too, it keeps you accountable for 
your actions on your webserver.  Finally, it might help in debugging an 
application at some point.


Jack Nerad

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message