Response is not getting logged?
Hi I am using tomcat + spring 3.0 ws trying to log request and response can see request in catalina, but no reponse??
<bean id="soapLoggingInterceptor"
class=开发者_开发知识库"org.springframework.ws.soap.server.endpoint.interceptor.SoapEnvelopeLoggingInterceptor">
<property name="logRequest" value="true" />
<property name="logResponse" value="true" />
<property name="logFault" value="true" ></property>
</bean>
<bean id="payloadMapping"
class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
<property name="interceptors">
<list>
<ref local="soapLoggingInterceptor" />
</list>
</property>
</bean>
<logger name="com.test.apptest">
<level value="DEBUG"/>
</logger>
I was able to do this by adding the following to my log4j.properties:
log4j.rootLogger=TRACE, console
log4j.logger.org.springframework.ws.client.MessageTracing.sent=TRACE
log4j.logger.org.springframework.ws.client.MessageTracing.received=TRACE
Of course the issue with this solution is it prints out all message going into and out of the services.
If you still want to use the logging interceptor then I think your logged above should read :
<logger name="org.springframework.ws.soap.server.endpoint.interceptor">
<level value="DEBUG"/>
</logger>
SoapEnvelopeLoggingInterceptor
will only log at DEBUG
level. So check your Tomcat logging config, and make sure that DEBUG-level logging is enabled for org.springframework.ws.soap.server.endpoint.interceptor
精彩评论