Spring Boot动态修改日志级别

1、

pom中引入

org.springframework.boot       spring-boot-starter-actuator

2、

发送POST请求:

地址

http://[服务地址]:[服务端口]/loggers/[要修改日志级别的包路径]

请求头

name: Content-Type

value: application/json

请求体

{"configuredLevel":"DEBUG"}

后边的DEBUG为日志级别

参考内容:

https://blog.csdn.net/tlk20071/article/details/75304086

原文地址:https://www.cnblogs.com/flying607/p/9295184.html