feignClient打印debug日志

一、创建feign配置类FeignConfiguration

@Configuration
public class FeignConfiguration {
  @Bean
  Logger.Level feignLoggerLevel() {
    return Logger.Level.FULL;
  }
}

二、feignClient注解属性添加配置

@FeignClient(name = "app", fallback = FsFeignFallBack.class, configuration= FeignConfiguration.class)

三、调整日志级别

logging.level.com.xx.oss.feign=DEBUG

四、查看debug日志

feign client调整超时时间

application.properties

feign.client.config.default.connect-timeout=5000
feign.client.config.default.read-timeout=5000
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=6000
发表新评论