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
pull/23445/head
Ralph Goers 4 years ago committed by Phillip Webb
parent f6f832b4da
commit 684b65e80c

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

Loading…
Cancel
Save