I am running Tomcat 7.0.54 on a Windows 2008 R1 with SP1 platform. I would like to control the contents of what gets logged to the Tomcat localhost_access_log
specifically , I would like to remove logging of entries like : 10.239.54.8 - - [13/Feb/2015:00:00:07 -0600] "GET /atb HTTP/1.0" 200 573 10.239.58.29 - - [13/Feb/2015:00:00:08 -0600] "GET /atb HTTP/1.0" 200 561 we have some external load balancers and server monitoring software periodically hitting the application web page to see if it is responding. I would like to know how remove these entries to reduce the amount of "noise" that is in the localhost_access_log log file, but allow other entries (i.e. from OTHER IP addresses or with other functions like "POST" or other strings like "HTTP/1.1" I have examined the information at the below link (unfortunately there is no example there with detail on what I am attempting to do). http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html Seems like I want to use the valve Access Log Valve Attributes: conditionIf or conditionUnless options from valve documentation, but it is not clear to me how to do this (if this is the correct way ?). Server.xml currently has the following setup configuration: <!-- Access log processes all example. Documentation at: /docs/config/valve.html Note: The pattern used is equivalent to using pattern="common" --> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> Is it possible to do this without programming (i.e. can I set the valve components to simply filter on an ip address or key word string (i.e. "Get /atb HTTP/1.0" and if that value is found in the request, can I chose to then NOT write that entry to the AccessLogValve). I have searched pretty thoroughly for some time on how to do this, but the documentation simply does not provide enough of an example on how to do this. I am not a programmer, but would think that filtering entries out of logs based on criteria would be a valuable feature to have. Any example would be greatly appreciated Thanks Jeff Sent from Google Nexus Phone