Question

Is there some way to manage tomcat logging from the log4j xml of a webapp ?

By this , I mean I am specifically looking to stop logs of level SEVERE from WebappClassLoader from being put into the catalina.out log.

EDIT :

While researching, I came to know that log4j will give priority to log4j.xml from any parent class loader if the file is present or the one present in WEB-INF/classes. If no other log4j.xml file is present for parent class loaders , will the default setting be taken for tomcat and application specific from the webapp log4j.xml ?

Was it helpful?

Solution

No, I think there's no way to override Tomcat's logging settings in a web application.

To solve your problem you may try to change Tomcat's default logging configuration. If you prefer log4j, you may try to configure Tomcat to use log4j instead of java.util.logging.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top