Browse Source

Deprecate classpath logging listener and stop registering by default

Closes gh-23138
pull/24020/head
Andy Wilkinson 5 years ago
parent
commit
4c777c6df7
  1. 2
      spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteSpringApplication.java
  2. 4
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/ClasspathLoggingApplicationListener.java
  3. 1
      spring-boot-project/spring-boot/src/main/resources/META-INF/spring.factories

2
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteSpringApplication.java

@ -26,7 +26,6 @@ import org.springframework.boot.SpringApplication; @@ -26,7 +26,6 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.context.config.AnsiOutputApplicationListener;
import org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor;
import org.springframework.boot.context.logging.ClasspathLoggingApplicationListener;
import org.springframework.boot.context.logging.LoggingApplicationListener;
import org.springframework.boot.devtools.remote.client.RemoteClientConfiguration;
import org.springframework.boot.devtools.restart.RestartInitializer;
@ -75,7 +74,6 @@ public final class RemoteSpringApplication { @@ -75,7 +74,6 @@ public final class RemoteSpringApplication {
listeners.add(new AnsiOutputApplicationListener());
listeners.add(new EnvironmentPostProcessorApplicationListener(
EnvironmentPostProcessorsFactory.of(ConfigDataEnvironmentPostProcessor.class)));
listeners.add(new ClasspathLoggingApplicationListener());
listeners.add(new LoggingApplicationListener());
listeners.add(new RemoteUrlPropertyExtractor());
return listeners;

4
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/ClasspathLoggingApplicationListener.java

@ -24,6 +24,7 @@ import org.apache.commons.logging.LogFactory; @@ -24,6 +24,7 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.boot.context.event.ApplicationFailedEvent;
import org.springframework.boot.diagnostics.FailureAnalysis;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.GenericApplicationListener;
import org.springframework.context.event.SmartApplicationListener;
@ -37,7 +38,10 @@ import org.springframework.core.ResolvableType; @@ -37,7 +38,10 @@ import org.springframework.core.ResolvableType;
*
* @author Andy Wilkinson
* @since 2.0.0
* @deprecated since 2.4.0 with no direct replacement. {@link FailureAnalysis} is now the
* preferred approach for diagnosing and reporting startup failures.
*/
@Deprecated
public final class ClasspathLoggingApplicationListener implements GenericApplicationListener {
private static final int ORDER = LoggingApplicationListener.DEFAULT_ORDER + 1;

1
spring-boot-project/spring-boot/src/main/resources/META-INF/spring.factories

@ -42,7 +42,6 @@ org.springframework.boot.builder.ParentContextCloserApplicationListener,\ @@ -42,7 +42,6 @@ org.springframework.boot.builder.ParentContextCloserApplicationListener,\
org.springframework.boot.context.FileEncodingApplicationListener,\
org.springframework.boot.context.config.AnsiOutputApplicationListener,\
org.springframework.boot.context.config.DelegatingApplicationListener,\
org.springframework.boot.context.logging.ClasspathLoggingApplicationListener,\
org.springframework.boot.context.logging.LoggingApplicationListener,\
org.springframework.boot.env.EnvironmentPostProcessorApplicationListener,\
org.springframework.boot.liquibase.LiquibaseServiceLocatorApplicationListener

Loading…
Cancel
Save