Access Logs

 
To get access logs for the tomcat http connection, you have to install a ''valve''

Specifically you want to install an Access Log Valve. You do this by editing the server.xml file and adding it within the ''host'' object. below is an example from the jakarta site

<Host name="localhost" ...> … <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".txt" pattern="combined"/> … </Host>

Here is the entry we use on iliad2. I suspect we created it in the admin interface, hence the explicit formatting.

<Engine ...> <Host ...> <Logger ...> <Valve className="org.apache.catalina.valves.AccessLogValve" fileDateFormat="yyyy-MM-dd" pattern="%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i""/> </Host> <Logger ...> <Realm ...> </Engine>

Referece: >>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/valve.html#Access%20Log%20Valve

Comments