I am using Embedded Tomcat (Version 7.028). My Embedded Tomcat server is a configurable server which can add one or more web-apps to it.
I want to log the errors/info messages in Embedded Tomcat in one log file and maintain different log files for all the applications deployed on Embedded Tomcat. I have a log4j.properties file placed in the classpath for Embedded Tomcat. It is being read properly and I'm able to log the info and error messages for Tomcat. I have also declared all the loggers in my Embedded Tomcat as non-static.
I have put log4j.xml in the webapp's WEB-INF/classes location to override the log4j.properties of Embedded Tomcat (Referred to the Link). But the log4j.xml is not getting initiated. The log4j setup from Tomcat is only being used.
Please help me how to overcome this problem. Is there any configuration that can be added to the xml or the properties file?