• mrumpf's avatar
    Fixed the check whether Log4j2 is available on the classpath · 1f5291cd
    mrumpf authored
    In Spring Boot 1.3.1 the class 'org.apache.logging.log4j.LogManager'
    is used to check which logging backend is in use. But this class is
    part of the log4j-api.jar and not part of the log4j-core.jar.
    That means the check is invalid, as it does not detect the actual
    core implementation of Log4j2 correctly.
    
    When you want to redirect Log4j2 logging via SLF4J, a NPE occurs
    each time the application is reloaded by the devtools, because the
    class Log4j2RestartListener tries to shutdown Log4j2 resources.
    This is done by accessing some internal shutdown method via
    reflection. The method that is being looked for does not exist
    when the log4j-api.jar is available only on the classpath,
    resulting in a NPE. This causes the application to stop,
    disappearing from the Spring Boot Dashboard in Eclipse
    
    Closes gh-4831
    1f5291cd
Name
Last commit
Last update
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools 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...
.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...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...