mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Properly guard LogbackLoggingSystem
Previously, LoggingSystem#get would chose Logback by the sole presence of a class in logback-core, with the assumption that logback-classic is also on the classpath. An app that only had the former would therefore fail. This commit updates the condition to check for a class in logback-classic instead. Closes gh-26711
This commit is contained in:
parent
647451087f
commit
7e4defbcba
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2019 the original author or authors.
|
* Copyright 2012-2021 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -60,7 +60,8 @@ public abstract class LoggingSystem {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
Map<String, String> systems = new LinkedHashMap<>();
|
Map<String, String> systems = new LinkedHashMap<>();
|
||||||
systems.put("ch.qos.logback.core.Appender", "org.springframework.boot.logging.logback.LogbackLoggingSystem");
|
systems.put("ch.qos.logback.classic.LoggerContext",
|
||||||
|
"org.springframework.boot.logging.logback.LogbackLoggingSystem");
|
||||||
systems.put("org.apache.logging.log4j.core.impl.Log4jContextFactory",
|
systems.put("org.apache.logging.log4j.core.impl.Log4jContextFactory",
|
||||||
"org.springframework.boot.logging.log4j2.Log4J2LoggingSystem");
|
"org.springframework.boot.logging.log4j2.Log4J2LoggingSystem");
|
||||||
systems.put("java.util.logging.LogManager", "org.springframework.boot.logging.java.JavaLoggingSystem");
|
systems.put("java.util.logging.LogManager", "org.springframework.boot.logging.java.JavaLoggingSystem");
|
||||||
|
Loading…
Reference in New Issue
Block a user