Remove ResourceUtils.getURL logging config check

Remove `ResourceUtils.getURL` checking from `LoggingApplicationListener`
so that logging systems can implement custom location support.

Prior to this commit, we checked in the listener if the specified config
location could be opened as a URL. This unfortunately prevents Log4J
extensions such as `log4j-spring-cloud-config-client` from implementing
configurable SSL and credentials support.

See gh-22946
This commit is contained in:
Ralph Goers
2020-08-13 14:39:59 -07:00
committed by Phillip Webb
parent f6f832b4da
commit 684b65e80c

View File

@@ -53,7 +53,6 @@ import org.springframework.core.env.Environment;
import org.springframework.core.log.LogMessage;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.util.ResourceUtils;
import org.springframework.util.StringUtils;
/**
@@ -314,7 +313,6 @@ public class LoggingApplicationListener implements GenericApplicationListener {
}
else {
try {
ResourceUtils.getURL(logConfig).openStream().close();
system.initialize(initializationContext, logConfig, logFile);
}
catch (Exception ex) {