我們最近從CXF 2.2.3遷移到CXF2.7.17,並且在日誌文件中我們看不到任何cxf日誌,它們應該是去。CXF log4j在從cxf 2.2.3遷移到2.7.17之後不起作用
據我所知,我們的CXF日誌配置非常標準。
在cxf.xml我們
<bean id="logInbound" class="org.apache.cxf.interceptor.LoggingInInterceptor" />
<bean id="logOutbound" class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
<cxf:bus>
<cxf:inInterceptors>
<ref bean="logInbound" />
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="logOutbound" />
</cxf:outInterceptors>
<cxf:outFaultInterceptors>
<ref bean="logOutbound" />
</cxf:outFaultInterceptors>
<cxf:inFaultInterceptors>
<ref bean="logInbound" />
</cxf:inFaultInterceptors>
</cxf:bus>
將tomcat(7與Java 7)與參數推出:
-Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger
而在我們lo4g道具文件:
log4j.appender.cxfAppender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.cxfAppender.file=/usr/users/theuser/DATA/LOG/theappli-web/theappli-CXF.log
log4j.appender.cxfAppender.layout=com.thefirm.log.PatternLayout
log4j.appender.cxfAppender.layout.ConversionPattern=%D %h TOMCAT[-%C{1}] : %X{UTILISATEUR}-%X{JSESSIONID};%p;%M;ESV;%X{CODE_MSG};%m;;%n
log4j.logger.org.apache.cxf.interceptor=INFO, cxfAppender
log4j.additivity.org.apache.cxf.interceptor=false
遷移期間這些文件中沒有任何更改。遷移後有沒有人遇到同樣的問題?