I have a simple upstart script for tomcat. Here is the chef template:
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
# add user with this command:
## adduser --system --ingroup www-data --home /opt/apache-tomcat apache-tomcat
setuid "<%= node['tomcat']['user'] %>"
setgid "<%= node['tomcat']['group'] %>"
# paths:
env JAVA_HOME="<%= node["java"]["home"] %>"
env CATALINA_BASE="<%= node["tomcat"]["base"] %>"
env CATALINA_HOME="<%= node["tomcat"]["home"] %>/current"
exec $CATALINA_HOME/bin/catalina.sh run
# cleanup temp directory after stop
post-stop script
rm -rf $CATALINA_HOME/temp/*
end script
After switching from init script to the upstart script posted above, all tomcat logs are written to /var/log/upstart/tomcat. Is there any reason why all logs go into the upstart log? What's a good way to work around that? This is on ubuntu 12.04