标签:code 响应 config bean -- 枚举 ugui ogg inf
在使用微服务时,常常会用feign做客户端去调用别的微服务,但是在日志中很难查看到具体的请求和响应。因此,需要把feign默认的日志打开。
@Configuration
public class FeignLogConfiguration {
    @Bean
    Logger.Level feignLoggerLevel() {
        return Logger.Level.FULL;
    }
}Logger.Level是枚举类
application.properties或者application.yml文件中设置Feign客户端的日志级别----->可以看到feign客户端的请求响应logging.level.com.wugui.spring.cloud.weather.Service:debug


标签:code 响应 config bean -- 枚举 ugui ogg inf
原文地址:https://www.cnblogs.com/peterpoker/p/9563478.html