TomcatExpert

Application logging locations with multiple Apache Tomcat instances?

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:

/applog/demo
/applog/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 ?

asked by edbras

question

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.

answer

answered by fhanik on June 16, 2011 11:32 AM

Filip Hanik is a Senior Software Engineer for the SpringSource Division of VMware, Inc. (NYSE: VMW) and a key participant in the company's Apache Tomcat initiatives. Filip brings 15 years of extensive experience in architecture, design and development of distributed application frameworks and containers and is recognized for his top-quality system development skills and continuous participation of Open Source development projects. Filip is an Apache Software Foundation member and a committer to the Apache Tomcat project where he is a leading authority on Tomcat clustering and a key contributor to the core of the platform. Filip has made contributions to software initiatives for Walmart.com, Sony Music, France Telecom and has held a variety of senior software engineering positions with technology companies in both the United States and Sweden. He received his education at Chalmers University of Technology in Gothenburg, Sweden where he majored in Computer Science and Computer Engineering.

Comments

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.