惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
博客园 - 司徒正美
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
D
Docker
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
腾讯CDC
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
I
InfoQ
雷峰网
雷峰网
The Cloudflare Blog
美团技术团队
Engineering at Meta
Engineering at Meta

博客园 - 蜗牛无敌

管理心得-协调 项目git 提交 hooks excel 公式支持 ~ - flowable-ui本地部署 mqtt实战 自动生成提示 修改表中数据时候,关联查询,例如删除一张表中 小于最大时间的sql, rocketmq-spring-boot-starter的使用 MYSQL ORDER BY 自定义排序 java程序cpu飘高排查 window canal的本地部署 是用hutool工具实现动态定时任务 python使用selenium框架模拟登录 获取token,并打包成exe spring-cloud-stater-stream-rocketmq springboot mybatisplus 使用拦截器改写sql语句 spring-cloud-stream-rocketmq实现消息的顺序消息 springboot 集成es 使用resthightlevel springboot 多租户环境下 由于业务需要搜集所有租户的基本数据 spring boot rockmq 生产者和消费者 实战 window系统关闭指定端口的应用方法
springboot为基础的项目 由于线上日志打印的级别较低,无法打...
蜗牛无敌 · 2024-08-19 · via 博客园 - 蜗牛无敌

测试环境:

第一步:动态修改类的日志打印级别

 
curl "http://118.24.124.163:30033/actuator/loggers/jnpf.attendance.controller.AttenceMachineController" -H "Content-Type: application/json" -d "{\"configuredLevel\":\"error\"}" -X POST

curl "http://127.0.0.1:30033/actuator/loggers/jnpf.attendance.controller.AttenceMachineController" -H "Content-Type: application/json" -d "{\"configuredLevel\":\"debug\"}" -X POST

第二步:回退

curl "http://118.24.124.163:30033/actuator/loggers/jnpf.attendance.controller.AttenceMachineController" -H "Content-Type: application/json" -d "{\"configuredLevel\":\"debug\"}" -X POST

 注意:

   1、其中jnpf.attendance.controller.AttenceMachineController 为类的全路径,在实际使用的时候,替换实际的类的全路径即可

  2、日志调整只能把 debug->info->error,不能把代码中打印的 error->info->debug