OpenFeign 日志

1、yaml文件

指定日志的位置和等级

logging:
  level:
    com.wt.order.feign: debug

2、配置类

package com.wt.order.config;

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


/**
 * @Description: TODO
 * @Author: 1872428
 * @Date: 2025/6/9 19:11
 * @Version: 1.0
 **/
@Configuration
public class OpenFeignConfig {
    @Bean
    public Logger.Level feignLoggerLevel(){
        return Logger.Level.FULL;
    }
}

 或在yaml文件中

spring:
  cloud:
    openfeign:
      client:
        config:
          default:
            logger-level: full

 

posted @ 2025-06-09 19:14  市丸银  阅读(15)  评论(0)    收藏  举报