Search code examples
javaspringspring-boothystrixnetflix-feign

Logging request and response json payloads with Hystrix Feign


I am using Hystrix Feign with Spring Encoder. I want to log exact request (Json) payload that goes out with each request and also the response. How can I do that?


Solution

  • When you define your feign configuration, you have to set the feign logger level, according to the feign logger class, you have 4 possible values, so probably you want to use Logger.Level.FULL.

    Hope this help you.