使用 Hystrix Feign 记录请求和响应 json 负载

Logging request and response json payloads with Hystrix Feign

我正在使用带有 Spring 编码器的 Hystrix Feign。 我想记录每个请求发出的确切请求 (Json) 负载 还有回应。 我该怎么做?

当你定义你的 feign 配置时,你必须 set the feign logger level, according to the feign logger class,你有 4 个可能的值,所以你可能想使用 Logger.Level.FULL.

希望对您有所帮助。