First of all, why does Tomcat take so long to shut down? It took almost three minutes just now… Funnily, it takes two and a half seconds to start up.
Anyway, I’ve finally found out how to enable access logs on Tomcat, thanks to this page. Just add the following snippet in the correct section of the $TOMCAT_HOME/conf/server.xml
file:
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
Restart Tomcat. It’s working.