I have a tomcat server running perfectly fine apart from writing the access logs. In Server.xml, the access log is defines like below:
<Server port="xxxx" shutdown="SHUTDOWN">
<GlobalNamingResources>
----
</GlobalNamingResources>
<Service name="Catalina">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="access." suffix=".log" pattern="common" resolveHosts="false"/>
<Connector --- />
<Connector --- />
<Executor --- />
<Engine name="Catalina" defaultHost="localhost">
<Realm ---/>
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"></Host>
</Engine>
</Service>
I can see that accesslog valve is defined under service tag and not inside of Engine, host or Context as per common implementation. Can this be the reason behind the server not writing access logs
Official documentation suggesting supporting this: https://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Access_Logs