爱吃鱼饵

 

OpenFeign添加日志信息

配置OpenFeign的日志bean;

在目录下写创建config包写config文件

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;
    }
}

配置去application.yml里面开启

logging:
   level:
    com.gizwits.glive.modules.system.service.ISysPermissionServiceApi: debug
    com.gizwits.glive.modules.system.service.ISysRoleServiceApi: debug
    com.gizwits.glive.modules.system.service.ISysRoleToPermissionServiceApi: debug
    com.gizwits.glive.modules.system.service.ISysUserSecurityServiceApi: debug
    com.gizwits.glive.modules.system.service.ISysUserServiceApi: debug
    com.gizwits.glive.modules.system.service.ISysUserToRoleServiceApi: debug

测试

远程调用信息

POST http://localhost:8023/ms/sys_user/login/username HTTP/1.1
Content-Length: 145
Content-Type: application/json

{"appKey":"02e927bb7757be0465d87bc2dd05adbc","version":"0.1","type":"appId","data":{"username":"XXX","password":"xxxx","code":"string"}}
END HTTP (145-byte body)

posted on 2021-07-02 14:57  爱吃鱼饵  阅读(188)  评论(0编辑  收藏  举报

导航