From bf9d72c9c4e9f835fb73cd88ad8f6bc76b6746ec Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Mon, 25 Feb 2008 12:15:38 +0000 Subject: [PATCH] Added more useful logging --- .../interceptor/PayloadLoggingInterceptorTest.java | 9 +++++++++ .../interceptor/SoapEnvelopeLoggingInterceptorTest.java | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/core/src/test/java/org/springframework/ws/server/endpoint/interceptor/PayloadLoggingInterceptorTest.java b/core/src/test/java/org/springframework/ws/server/endpoint/interceptor/PayloadLoggingInterceptorTest.java index a67c3101..e687cc13 100644 --- a/core/src/test/java/org/springframework/ws/server/endpoint/interceptor/PayloadLoggingInterceptorTest.java +++ b/core/src/test/java/org/springframework/ws/server/endpoint/interceptor/PayloadLoggingInterceptorTest.java @@ -21,7 +21,10 @@ import org.apache.log4j.AppenderSkeleton; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; +import org.apache.log4j.PropertyConfigurator; import org.apache.log4j.spi.LoggingEvent; + +import org.springframework.core.io.ClassPathResource; import org.springframework.ws.MockWebServiceMessage; import org.springframework.ws.MockWebServiceMessageFactory; import org.springframework.ws.context.DefaultMessageContext; @@ -45,6 +48,12 @@ public class PayloadLoggingInterceptorTest extends TestCase { appender.reset(); } + protected void tearDown() throws Exception { + BasicConfigurator.resetConfiguration(); + ClassPathResource resource = new ClassPathResource("log4j.properties"); + PropertyConfigurator.configure(resource.getURL()); + } + public void testHandleRequestDisabled() throws Exception { interceptor.setLogRequest(false); int eventCount = appender.getCount(); diff --git a/core/src/test/java/org/springframework/ws/soap/server/endpoint/interceptor/SoapEnvelopeLoggingInterceptorTest.java b/core/src/test/java/org/springframework/ws/soap/server/endpoint/interceptor/SoapEnvelopeLoggingInterceptorTest.java index ee2b1c79..97621e80 100644 --- a/core/src/test/java/org/springframework/ws/soap/server/endpoint/interceptor/SoapEnvelopeLoggingInterceptorTest.java +++ b/core/src/test/java/org/springframework/ws/soap/server/endpoint/interceptor/SoapEnvelopeLoggingInterceptorTest.java @@ -21,7 +21,10 @@ import org.apache.log4j.AppenderSkeleton; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; +import org.apache.log4j.PropertyConfigurator; import org.apache.log4j.spi.LoggingEvent; + +import org.springframework.core.io.ClassPathResource; import org.springframework.ws.context.DefaultMessageContext; import org.springframework.ws.context.MessageContext; import org.springframework.ws.soap.saaj.SaajSoapMessageFactory; @@ -45,6 +48,12 @@ public class SoapEnvelopeLoggingInterceptorTest extends TestCase { appender.reset(); } + protected void tearDown() throws Exception { + BasicConfigurator.resetConfiguration(); + ClassPathResource resource = new ClassPathResource("log4j.properties"); + PropertyConfigurator.configure(resource.getURL()); + } + public void testHandleRequestDisabled() throws Exception { interceptor.setLogRequest(false); int eventCount = appender.getCount();