Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jonashackt/850010a566963b07371a to your computer and use it in GitHub Desktop.
Save jonashackt/850010a566963b07371a to your computer and use it in GitHub Desktop.
Configure Logging of SOAP-Messages with Apache CXF with Spring Profiles
@Configuration
@Profile("logsoapmessages")
public class WebServiceMessageLoggerConfiguration {
@Autowired
private SpringBus springBus;
@Bean
public LoggingFeature loggingFeature() {
// Log SoapMessages to Logfile
LoggingFeature logFeature = new LoggingFeature();
logFeature.setPrettyLogging(true);
logFeature.initialize(springBus);
springBus.getFeatures().add(logFeature);
return logFeature;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment