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

推荐订阅源

Y
Y Combinator Blog
V
V2EX
Jina AI
Jina AI
爱范儿
爱范儿
M
MIT News - Artificial intelligence
量子位
L
LangChain Blog
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
罗磊的独立博客
腾讯CDC
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss

博客园 - 蜗牛无敌

管理心得-协调 项目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