I am about to install an extra tomcat instance on our test server
- I like to know how you configure the location of your application log files? Where do you put these and how to configure these?
I am thinking about the following on our linux machine:
Have one central app log location: /applog/ that contains sub dir's demo and test:
I use a system property app.environment during startup to indicate the environment. Value's are: dev, build, test, demo, prod.
I want to use this as the subdir name.
I am not sure if this the correct way to go.
- Another thing: tomcat automatically sets the environment variable catalina.home. Doesn't that conflict when having two tomcat instances using the same environment variabele? I suppose the last one that starts overwrites the previous value?... Should I rename this variable in the tomcat start scripts ?
Application logging is not something that is tied to Apache Tomcat itself. Apache Tomcat has no knowledge about where these logs go, how they are written and how they are configured. It would require knowledge about the application logging framework to understand how to configure this in your environment.
As for the catalina.home variable, this points to Apache Tomcat's binaries. There is another variable, catalina.base, this points to your actual Apache Tomcat's instance, and that is the variable you could use.
It would not be good for you to rename these variables, as Apache Tomcat itself depends on them.