• Andy Wilkinson's avatar
    Uninstall SLF4J’s Java logging bridge handler during shutdown · 9744d282
    Andy Wilkinson authored
    Previously, when LogbackLoggingSystem or Log4JLoggingSystem were
    initialized during application start up, they would install SLF4J’s Java
    logging bridge handler, however no corresponding uninstall was performed
    during application shutdown. When deployed to a servlet container, where
    the application’s lifecycle doesn’t match the JVM’s lifecycle, this lead
    to a memory leak.
    
    This commit updates LoggingSystem to introduce a new cleanUp method. An
    empty implementation is provided to preserve backwards compatibility
    with existing LoggingSystem subclasses. Both LogbackLoggingSystem and
    Log4JLoggingSystem have been updated to implement cleanUp and uninstall
    the SLF4J bridge handler. LoggingApplicationListener has been updated
    to call LoggingSystem.cleanUp in response to a ContextClosedEvent.
    
    Closes gh-2324
    9744d282
Name
Last commit
Last update
docs Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-tools Loading commit data...
spring-boot-versions Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
pom.xml Loading commit data...