I'm still on the subject of logging http requests. It's been mentioned that using a ClientHttpRequestInterceptor with a rest-template attribute of the http:outbound-gateway can be an approach.
Spring Integration AOP for Logging outbound Http requests
Logging http request in Spring integration http outbound gateway
However, I'm already using request-factory on my http:outbound-gateway objects since I want the Apache httpClient, using HttpComponentsClientHttpRequestFactory. This excludes defining a rest-template attribute on the http:outbound-gateway. Can the ClientHttpRequestInterceptor approach work this way? Or will I need to subclass the factory and produce a HttpClientRequest with an execute() method that does the logging? Thanks for any pointers.