Spring Boot and JBOSS EAP 6.2.0 logging
Problem: There is no logging with Java jax-ws client. Other logs are written fine to server.log
logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<logger name="org.springframework.web" level="INFO"/>
<!-- Spring WS SOAP envelop logger interceptor beállítás -->
<logger name="org.springframework.ws.server.MessageTracing" level="TRACE" />
<logger name="org.springframework.transaction.interceptor.TransactionInterceptor" level="TRACE" />
<logger name="this.is.my.package" level="DEBUG"/>
</configuration>
Application.java (boot your app)
@Configuration
@ComponentScan(basePackages = "this.is.my.package")
@EnableAutoConfiguration
@EnableTransactionManagement(order = Ordered.HIGHEST_PRECEDENCE - 20)
@EnableAspectJAutoProxy
@SuppressWarnings("unchecked")
public class TomcatStart {
/**
* Boot app
* @param args
*/
public static void main(String[] args) {
// JAX-WS logs: http://stackoverflow.com/questions/1945618/tracing-xml-request-responses-with-jax-ws
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
SpringApplication springApp = new SpringApplication(TomcatStart.class);
springApp.addListeners(new ApplicationPidListener("application.pid"));
springApp.run(args);
}
standalone.xml configuration modification
<system-properties>
<property name="org.apache.cxf.logging.enabled" value="true"/>
</system-properties>
...
<logger category="hu.vanio">
<level name="DEBUG"/>
</logger>
<logger category="org.springframework.transaction.interceptor.TransactionInterceptor">
<level name="TRACE"/>
</logger>
<logger category="org.springframework.ws.server.MessageTracing">
<level name="TRACE"/>
</logger>
<logger category="org.springframework.web">
<level name="INFO"/>
</logger>