OpenFeign日志

yml文件添加以下

logging:
  level:
    # feign日志以什么级别监控哪个接口
    com.atguigu.springcloud.service.PaymentFeignService: debug

创建config文件
在这里插入图片描述

FeignConfig了内容

import feign.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FeignConfig
{
    @Bean
    Logger.Level feignLoggerLevel()
    {
        return Logger.Level.FULL;//FULL为最全,还有BASIC,HEADERS,NONE
    }
}

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_42572245/article/details/107354284