简体   繁体   English

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

[英]Logging request and response json payloads with Hystrix Feign

I am using Hystrix Feign with Spring Encoder. 我正在使用Hystrix Feign和Spring Encoder。 I want to log exact request (Json) payload that goes out with each request and also the response. 我想记录每个请求以及响应的确切请求(Json)有效负载。 How can I do that? 我怎样才能做到这一点?

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. 定义假装配置时,必须设置假装记录器级别 ,根据假装记录器类 ,您有4个可能的值,因此可能要使用Logger.Level.FULL.

Hope this help you. 希望这对你有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM