Tuesday, April 7, 2009

Enabling Access Logs on Tomcat 6

Tomcat 6 has a new feature which logs access logs. This can be easily enabled by uncommenting the required code in the conf/server.xml.

<valve classname="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolvehosts="false">
</valve>

This can be embedded for the Host or per context basis

No comments:

 
Free Domain Names @ .co.nr!