简体   繁体   中英

How to stop logging all debug statements in tomcat server

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM