Merge pull request #4831 from mrumpf/gh-4822
* pr/4831: Fixed the check whether Log4j2 is available on the classpath
This commit is contained in:
commit
11d4c2c180
|
@ -38,7 +38,7 @@ public class Log4J2RestartListener implements RestartListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeRestart() {
|
public void beforeRestart() {
|
||||||
if (ClassUtils.isPresent("org.apache.logging.log4j.LogManager",
|
if (ClassUtils.isPresent("org.apache.logging.log4j.core.impl.Log4jContextFactory",
|
||||||
getClass().getClassLoader())) {
|
getClass().getClassLoader())) {
|
||||||
prepareLog4J2ForRestart();
|
prepareLog4J2ForRestart();
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public abstract class LoggingSystem {
|
||||||
Map<String, String> systems = new LinkedHashMap<String, String>();
|
Map<String, String> systems = new LinkedHashMap<String, String>();
|
||||||
systems.put("ch.qos.logback.core.Appender",
|
systems.put("ch.qos.logback.core.Appender",
|
||||||
"org.springframework.boot.logging.logback.LogbackLoggingSystem");
|
"org.springframework.boot.logging.logback.LogbackLoggingSystem");
|
||||||
systems.put("org.apache.logging.log4j.LogManager",
|
systems.put("org.apache.logging.log4j.core.impl.Log4jContextFactory",
|
||||||
"org.springframework.boot.logging.log4j2.Log4J2LoggingSystem");
|
"org.springframework.boot.logging.log4j2.Log4J2LoggingSystem");
|
||||||
systems.put("org.apache.log4j.PropertyConfigurator",
|
systems.put("org.apache.log4j.PropertyConfigurator",
|
||||||
"org.springframework.boot.logging.log4j.Log4JLoggingSystem");
|
"org.springframework.boot.logging.log4j.Log4JLoggingSystem");
|
||||||
|
|
Loading…
Reference in New Issue