With Springboot 3 in order to get request logs from org.springframework.web.reactive.function.client.WebClient
Without header just add trace logs of class ExchangeFunctions in application.yml
logging:
level:
org.springframework.web.reactive.function.client.ExchangeFunctions: trace
Example
2023-11-03T13:21:29.907-04:00 TRACE [...] 14608 --- [nio-8080-exec-1] o.s.w.r.f.client.ExchangeFunctions : [652413fc] HTTP GET https://......, headers={masked}
With headers, set log details for codecs in application.yml
spring:
codec:
log-request-details: true
Example
2023-11-03T13:39:52.459-04:00 TRACE [...] 5872 --- [nio-8080-exec-2] o.s.w.r.f.client.ExchangeFunctions : [4a841d85] HTTP GET https://......., headers=[Accept:"application/json", Authorization:"Bearer .....", X-B3-TraceId:"...", X-B3-SpanId:"...", X-B3-ParentSpanId:"...", X-B3-Sampled:"0"]
spring.http.log-request-details=trueto yourapplication.properties. Assuming you are using Spring Boot 2.1 here.DEBUGor any lower level:logging.level.web: DEBUG