I'm forced to use custom closed source lib in my web app deployed in tomcat 6. It is logging a lot of exceptions in my stdout log (catalina.out) via printStackTrace and then rethrowing them for me to handle. Is there a way to prevent or reroute logging of exceptions from a specific package deployed in webapp?
相关问题
- how to call a C++ dll from C# windows application
- I want to trace logs using a Macro multi parameter
- Tomcat and SSL Client certificate
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
相关文章
- Tomcat的User信息可以存储到数据库中吗?
- tomcat的server.xml支持从Oracle中获取数据吗?
- web项目,Resonse Header发生解析错误,请大牛帮忙看看究竟是哪里的问题?
- Apache+Tomcat+JK实现的集群,如果Apache挂了,是不是整个服务就挂了?
- linux环境部署jpress,创建数据库时提提示连接失败
- how do I log requests and responses for debugging
- JUnit continue to assert things after expected exc
- Making a two way SSL authentication between apache
How about calling that segment within a try/catch segment, thus catching the exception before your app dies, adding it to log4j (or any other logging mechanism)
e.printStackTrace
prints to the console similar to System.errIn Tomcat, the
catalina.sh
has this line which redirects all console errors to catalina.out This applies for the Tomcat server as a whole.So in short, if you cant tinker with the source code to use log4j, you could try sending this to another file within the catalina.sh, but again this would not be package specific as you want.
And this would just bloat another file in a similar manner.