我有一个使用 Spring 和 CXF 的 Java 服务。该代码来自以前的开发人员,我正在提供维护,但我在日志中看到了这一点
--------------------------------------
Apr 16, 2013 1:44:11 PM org.apache.cxf.interceptor.AbstractLoggingInterceptor log
INFO: Inbound Message
----------------------------
ID: 33
Address: /MyApplication/endpoint
Encoding: UTF-8
Http-Method: POST
Content-Type: application/x-www-form-urlencoded
Headers: {content-type=[application/x-www-form-urlencoded], connection=[close], host= [localhost:8080], Content-Length=[11504], user-agent=[Apache-HttpClient/4.2.3 (java 1.5)], Content-Type=[application/x-www-form-urlencoded]}
Payload: {
"events" :
[ { event }, { event }, ... ]
}
而且我们有太多的事件,日志变得难以管理。有什么办法可以关闭此日志记录吗?这些日志调用不是从应用程序内部创建的,它们是由某种我找不到的拦截器创建的。我确实在 cxf-context.xml 配置文件中找到了这一点:
<cxf:bus>
<cxf:features>
<cxf:logging />
</cxf:features>
</cxf:bus>
但在我已经从配置文件中注释掉这些行后,日志记录仍然出现。
请帮忙。谢谢
由于应用程序使用 log4j,因此将“org.apache.cxf”记录器级别设置为“错误”。将此行添加到 log4j.properties:
log4j.logger.org.apache.cxf=ERROR
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)