Original article: http://www.blue-bag.com/blog/excluding-common-requests-your-apache-logs
Log files can get filled up with repeated calls to files such as favicon, robots.txt, images, css js etc
Mostly you want to log the initial request for a page and not all of the resources subsequently requested.
Troubleshooting other issues may mean you would log files such as favicon, images etc - but generally they needlessly fill up your logs.
Do it ocassionally to look for missing images etc.
Here is a way to exclude them from your log files. This method sets an environment variable for each type of file so that you can turn logging on and off for each as you see fit.
E.g. To turn logging back on for images - update the line:
SetEnvIf Request_URI "(\.gif|\.png|\.jpg)$" image-request=nolog
to
SetEnvIf Request_URI "(\.gif|\.png|\.jpg)$" image-request=log
Put the following section in your Apache config / Vhosts settings for the site (just before the closing VirtualHost tag):