0

My system consists of 3 tomcats running under 3 different linux accounts. Each tomcat has at least 1 web application. Multiple log4j.properties are found in tomcat/lib and in source folders. When looking at prints in catalina.out I find prints from appenders even from another tomcat instance and that's my problem. I know that my problem sounds a bit vague but I don't expect concrete answer either. Can you direct me to good article explaining how log4j flow can go in such a complex systems? Or maybe efficient way to debug such situation?

user1439579
  • 131
  • 10

2 Answers2

0

catalina.out is used to store the stdout and stderr output from a Tomcat instance. From what you've said it seems that each Tomcat instance happens to write to the same catalina.out (something like /var/log/tomcat7/catalina.out).

You would be best setting up log4j for each application to write to a different log file. You can do this using a FileAppender. See this post for some examples.

Community
  • 1
  • 1
jas_raj
  • 1,131
  • 6
  • 14
0

Depends on your configuration. If you copied the tomcats folders and have '3' independed installation thatn you should have independed logs. There are configured in /conf/logging.properties. Most likely you set up the CATALINA_HOME once for the whole system, so your 3 tomcats share these path and all will write to the same logs under CATALINA_HOME/logs. IF the CATALINA_HOME is missing, then the startup scripts will do autodiscovery of the home dir, and each will startup with different /log dir. Or mayke usre that your startup scripts have unique values set.

Zielu
  • 8,312
  • 4
  • 28
  • 41