我已经将我的应用程序中的cxf版本从2.x升级到了3.3.2,因此想用LoggingInInterceptor
替换以前不推荐使用的LoggingOutInterceptor
和LoggingFeature
。为此,我从cxf总线上删除了拦截器bean,并添加了LoggingFeature
,如下所示:
<cxf:bus>
<cxf:features>
<bean class="org.apache.cxf.ext.logging.LoggingFeature">
<property name="prettyLogging" value="true"/>
</bean>
</cxf:features>
</cxf:bus>
我已经有了其他步骤,将cxf LoggingFeature
与我预先添加的slf4j设置as described in this SO question一起用于拦截器:META-INF/cxf/org.apache.cxf.Logger
文件和org.apache.cxf
log4j2记录器。
现在结果是未记录传入请求(应为cxf日志记录类型REQ_IN
imo),但响应(RESP_OUT
)已记录。
什么可能导致这种行为?