当前位置:网站首页>OpenFeign调用详细日志展示
OpenFeign调用详细日志展示
2022-04-23 21:57:00 【Leon_Jinhai_Sun】
# 0.说明
- 往往在服务调用时我们需要详细展示feign的日志,默认feign在调用是并不是最详细日志输出,因此在调试程序时应该开启feign的详细日志展示。feign对日志的处理非常灵活可为每个feign客户端指定日志记录策略,每个客户端都会创建一个logger默认情况下logger的名称是feign的全限定名需要注意的是,feign日志的打印只会DEBUG级别做出响应。
- 我们可以为feign客户端配置各自的logger.lever对象,告诉feign记录那些日志logger.lever有以下的几种值
`NONE 不记录任何日志
`BASIC 仅仅记录请求方法,url,响应状态代码及执行时间
`HEADERS 记录Basic级别的基础上,记录请求和响应的header
`FULL 记录请求和响应的header,body和元数据
# 1.开启日志展示
feign.client.config.PRODUCTS.loggerLevel=full #开启指定服务日志展示
#feign.client.config.default.loggerLevel=full #全局开启服务日志展示
logging.level.com.leon.feignclients=debug #指定feign调用客户端对象所在包,必须是debug级别
# 2.测试服务调用查看日志
版权声明
本文为[Leon_Jinhai_Sun]所创,转载请带上原文链接,感谢
https://blog.csdn.net/leon_jinhai_sun/article/details/124333699
边栏推荐
- 清华大学 | WebFace260M:百万级深度人脸识别的基准(TPAMI2022)
- ubutnu20安装CenterNet
- Chrome 94 introduces the controversial idle detection API, which apple and Mozilla oppose
- ROS learning notes - tutorial on the use of ROS
- DeNO 1.13.2 release
- [leetcode refers to offer 25. Merge two sorted linked lists (simple)]
- QT QML component library records owned by QML except basic components
- Unit function expansion
- LabVIEW修改应用程序窗口外观
- Centos7 builds MySQL master-slave replication from scratch (avoid stepping on the pit)
猜你喜欢
airbase 初步分析
Flomo software recommendation
Subcontracting of wechat applet based on uni app
Online timing flow chart making tool
[leetcode refers to offer 27. Image of binary tree (simple)]
MySQL back to table
ROS学习笔记-----ROS的使用教程
Tsinghua University | webface260m: benchmark for million level deep face recognition (tpami2022)
Preliminary analysis of Airbase
Ali has another "against the sky" container framework! This kubernetes advanced manual is too complete
随机推荐
South Korea may ban apple and Google from offering commission to developers, the first in the world
[leetcode sword finger offer 58 - I. flip word order (simple)]
Online Excel to CSV tool
Problem brushing plan -- dynamic programming (III)
Database Experiment four View experiment
2022 - 04 - 24 Daily: Current Progress and Open Challenges of Applied Deep Learning in Biological Sciences
Deep understanding of modern mobile GPU (continuously updating)
DW basic tutorial (I)
QT QML component library records owned by QML except basic components
Chrome 94 introduces the controversial idle detection API, which apple and Mozilla oppose
Tear the Google SRE book by hand
This paper solves the cross domain problem of browser
JS merge duplicate data in array object
在线时序流程图制作工具
Pyuninstaller package exe cannot find the source code when running, function error oserror: could not get source code
[leetcode refers to offer 22. The penultimate node in the linked list (simple)]
C # problem of updating data: dynamic SQL generation is not supported for multiple base tables
Resolve the "chromedriver executable needs to be in path" error
Crisis is opportunity. Why will the efficiency of telecommuting improve?
Subcontracting of wechat applet based on uni app