最后,这个解决方案对我有效:
META-INF/cxf/org.apache.cxf.Logger
我补充道:
org.apache.cxf.common.logging.Slf4jLogger
在spring配置中:applicationContext:
我补充道:
<bean id="loggingInInterceptor" class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
<bean id="loggingOutInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
<cxf:bus>
<cxf:inInterceptors>
<ref bean="loggingInInterceptor"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="loggingOutInterceptor"/>
</cxf:outInterceptors>
</cxf:bus>
并在logback中关闭标准输出中的soap日志记录。xml:
<!-- Apache CXF logger -->
<logger name="org.apache.cxf" level="INFO"/>
<logger name="org.apache.cxf.interceptor" additivity="false">
<!-- <appender-ref ref="STDOUT" /> -->
<appender-ref ref="FILE" />
</logger>
<root level="INFO">
<!-- <appender-ref ref="STDOUT" />-->
<appender-ref ref="FILE" />
</root>