Since calling run-app uses the tomcat-plugin in grails, how do I modify the grails AccessLogValve in the server.xml when it does not exists?
I only need this for development since in production I will just deploy the war to tomcat.
Thanks In Advance
Since calling run-app uses the tomcat-plugin in grails, how do I modify the grails AccessLogValve in the server.xml when it does not exists?
I only need this for development since in production I will just deploy the war to tomcat.
Thanks In Advance
You can configure it in a callback for the 'ConfigureTomcat' event in scripts/_Events.groovy:
import org.apache.catalina.valves.AccessLogValve
eventConfigureTomcat = { tomcat ->
tomcat.host.addValve new AccessLogValve(
directory: basedir, prefix: 'localhost_access_log.', pattern: 'common')
}