首页  

springboot2动态设置日志级别     所属分类 springboot 浏览量 860
查看日志文件内容
http://127.0.0.1:8073/api/actuator/logfile

查看所有的日志级别
http://127.0.0.1:8073/api/actuator/loggers

查看指定的日志级别
http://localhost:8073/api/actuator/loggers/xxx
{
    "configuredLevel": "INFO",
    "effectiveLevel": "INFO"
}

动态修改日志级别

curl -XPOST -H 'Content-Type:application/json' http://localhost:8073/api/actuator/loggers/xxx -d '{"configuredLevel": "ERROR"}'

不加 -H 'Content-Type:application/json'
org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded' not supported

查看修改后的日志级别
http://localhost:8073/api/actuator/loggers/xxx

{
    "configuredLevel": "ERROR",
    "effectiveLevel": "ERROR"
}

查看日志
http://127.0.0.1:8073/api/actuator/logfile




curl实用技巧

上一篇     下一篇
tomcat8的后台线程

tomcat请求处理过程

tomcat nio 读写关键代码

postman上传文件

Map computeIfAbsent 实例

励志歌曲系列