I'm using Apache Tomcat 7.0.47 in Windows 7 machine.
I am using log4j in my web application - MyApps and don't want to use log4j for Tomcat's internal logging. I have only kept log4j.jar and log4j.properties into WEB-INF/lib and WEB-INF/classes of my web application. No other modification in Tomcat's configuration. But, Tomcat is using log4j to log its internal information.
I want Tomcat to use java.util.logging (default) for its internal logging and my web application - MyApps to use log4j. Please advise where I am going wrong.
The logging used by Tomcat itself and the logging used by webapps are completely independent of each other, to the point that the logging system used by one webapp can be completely different from any other deployed webapp.
Except for cases where you've done a custom build of the Tomcat server itself, Tomcat will be using java.util.logging (juli) as its logger.
System.out.println statements executed from a webapp will appear in the catalina.out file, which is the usual place of the Tomcat server log, but they won't actually be going through the logging system, just routed to stdout, which, since it's also the default Tomcat juli log destination means that the 2 types of print (juli and System.out) will intermingle in the catalina.out logfile.
The original servlet spec had a logging method, which actually was pretty limited. As far as I know, it routes to Tomcat's System.out or juli logger, but it's better not to use it if your webapp is using a real logger like log4j or juli.
In short, you shouldn't be seeing the problem you claim you're seeing, since what you want is the normal way that Tomcat and webapps log.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: Issue while configuring Tomcat default log and log4j