• Andy Wilkinson's avatar
    Disable Log4j2's shutdown hook by default · cf940fd3
    Andy Wilkinson authored
    Previously, Log4j2's own shutdown hook was only disabled when Log4j2
    detected javax.servlet.Servlet on the classpath and, therefore,
    determined that it was running in a web application. In an application
    without Servlet on the classpath, this could lead to both Log4j2's shut
    down hook and and logging system's shutdown handler both stopping
    Log4j2. This could result in a failure as the second attempt at stopping
    would result in reinitialization which would fail as the JVM is already
    shutting down.
    
    This commit introduces a new Log4j2 PropertySource implementation,
    registered via META-INF/services, that sets the
    log4j.shutdownHookEnabled property to false. This will ensure that
    Log4j2's own shutdown hook is disabled by default whenever Spring Boot
    is on the classpath and not just in Servlet-based web applications.
    
    Fixes gh-26953
    cf940fd3
Name
Last commit
Last update
..
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-autoconfigure Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-properties-migrator Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-test Loading commit data...
spring-boot-test-autoconfigure Loading commit data...
spring-boot-tools Loading commit data...