Added more useful logging

This commit is contained in:
Arjen Poutsma
2008-02-25 12:15:38 +00:00
parent 3476bdaf14
commit bf9d72c9c4
2 changed files with 18 additions and 0 deletions

View File

@@ -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();

View File

@@ -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();