• Phillip Webb's avatar
    Improve Log4J log level reset support · 238d0fed
    Phillip Webb authored
    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
    238d0fed
Name
Last commit
Last update
.github Loading commit data...
buildSrc Loading commit data...
ci Loading commit data...
eclipse Loading commit data...
git/hooks Loading commit data...
gradle/wrapper Loading commit data...
idea Loading commit data...
spring-boot-project Loading commit data...
spring-boot-tests Loading commit data...
src Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
build.gradle Loading commit data...
gradle.properties Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
settings.gradle Loading commit data...