2

I want to log requests made by my RestTemplate and log time taken to fetch a response.

Currently I do not see a way to get the complete request url except by turning on the debug log for the REST template in logback.xml

<logger name="org.springframework.web.client.RestTemplate" level="DEBUG" />

There are two issues here: 1. Since I am working in a multithreaded environment I am unable to correlate the logs to the request I am making 2. I want the RestTemplate DEBUG statements to be logged for a particular class alone and not for every class utilizing the RestTemplate

Anand Sunderraman
  • 7,900
  • 31
  • 90
  • 150
  • 1
    Maybe this could help: http://stackoverflow.com/questions/7952154/spring-resttemplate-how-to-enable-full-debugging-logging-of-requests-responses – Nati Jan 19 '16 at 20:56

0 Answers0