How to stop logging all debug statements in tomcat server

2.9k views Asked by At

I have a Tomcat 5.5 container in dedicated private virtual server. Previously I have hosted struts1,struts2, servlet based applications and all works well. Now hosted a spring 3.2 mvc application and saw it generates huge debug statements in the stdout file only for spring application and file size increases. Any suggestion would be appreciated to stop generating the debug statements except errors.

Thanks.

1

There are 1 answers

10
Jibby On BEST ANSWER

Create a logging.properties file in your application's WEB-INF/classes folder with the following content:

handlers = 1spring.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler        

1spring.org.apache.juli.FileHandler.level = SEVERE

1spring.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1spring.org.apache.juli.FileHandler.prefix = springframework.

java.util.logging.ConsoleHandler.level = SEVERE  
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter      

org.springframework.handlers = 1spring.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler