Apache log4j is one of the most popular frameworks used for logging events within Java code. Apache CXF on the other hand is one of the most popular framework to support communication using web services.

To monitor and debug Java application there might be a need to log inbound and outbound web service messages.
If we use two frameworks mentioned above org.apache.cxf.interceptor.LoggingInInterceptor and
org.apache.cxf.interceptor.LoggingOutInterceptor might be configured without any intergeneration in the code to log web service messages.

In the following configuration web service messages will be logged to console on INFO level.

log4j.rootLogger=WARN, console
## Output cxf logging information to console
log4j.logger.org.apache.cxf.interceptor.LoggingInInterceptor=INFO, console
log4j.logger.org.apache.cxf.interceptor.LoggingOutInterceptor=INFO, console
log4j.appender.console.layout.ConversionPattern=%6p | %d | %F | %M | %L | %m%n

More information related to logging and debuging in Apache CXF can be found here.