-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
Spring-Boot: v2.3.5.RELEASE
Log4J2: 2.13.3 (spring-managed)
#Display default configuration
$ curl http://$SERVER/actuator/loggers{"levels":["OFF","FATAL","ERROR","WARN","INFO","DEBUG","TRACE"],"loggers":{ "ROOT":{"configuredLevel":null,"effectiveLevel":"WARN"}, "de":{"configuredLevel":null, "effectiveLevel":"WARN"},#Configure
de
Log Level
$ curl http://$SERVER/actuator/loggers/de -d '{"configuredLevel":"info"}' -H "Content-Type: application/json"
$ curl http://$SERVER/actuator/loggers{"levels":["OFF","FATAL","ERROR","WARN","INFO","DEBUG","TRACE"],"loggers":{ "ROOT":{"configuredLevel":null,"effectiveLevel":"WARN"}, "de":{"configuredLevel":"INFO","effectiveLevel":"INFO"},#Reset/inherit
de
Log Level
$ curl http://$SERVER/actuator/loggers/de -d '{"configuredLevel":null}' -H "Content-Type: application/json"
$ curl http://$SERVER/actuator/loggers{"levels":["OFF","FATAL","ERROR","WARN","INFO","DEBUG","TRACE"],"loggers":{ "ROOT":{"configuredLevel":null,"effectiveLevel":"WARN"}, "de":{"configuredLevel":"WARN", "effectiveLevel":"WARN"},#Configure
ROOT
Log Level
$ curl http://$SERVER/actuator/loggers/ROOT -d '{"configuredLevel":"error"}' -H "Content-Type: application/json"
$ curl http://$SERVER/actuator/loggers{"levels":["OFF","FATAL","ERROR","WARN","INFO","DEBUG","TRACE"],"loggers":{ "ROOT":{"configuredLevel":null,"effectiveLevel":"ERROR"}, "de":{"configuredLevel":"ERROR", "effectiveLevel":"ERROR"},
As you can see the last two jsons display de
as configured, but the value (even for the configured flag) is inherited from ROOT
.