Files
spring-boot/spring-boot-project
Phillip Webb 238d0fed71 Improve Log4J log level reset support
Update `Log4J2LoggingSystem` so that call to `setLevel` with a `null`
level with remove the logger if it was previously configured by a
`LoggingSystem` call.

To track which loggers have been configured by us, and which have been
configure directly by the user, a custom `LoggerConfig` subclass is
used. We'll only remove `LevelSetLoggerConfig` classes, for any others
we'll call `setLevel(null)` on the config.

Prior to this commit, it was impossible to set then reset a logger
level using the actuator endpoint. This is because Log4J doesn't provide
a way to get the actual configured level. If the `setLevel(null)` has
been applied, then `getLevel()` will return the value of the parent
logger or a default value of `ERROR`.

Fixes gh-24298
2021-04-15 12:22:24 -07:00
..
2021-04-15 16:31:10 +02:00
2021-04-15 16:31:10 +02:00
2021-04-15 16:31:10 +02:00
2021-03-30 20:52:38 +01:00
2021-04-09 15:06:13 +01:00
2021-03-16 20:25:41 +00:00
2021-04-14 15:05:55 -07:00