diff --git a/spring-core/src/main/java/org/springframework/util/Log4jConfigurer.java b/spring-core/src/main/java/org/springframework/util/Log4jConfigurer.java index c0e2f82c9b..e830aee02d 100644 --- a/spring-core/src/main/java/org/springframework/util/Log4jConfigurer.java +++ b/spring-core/src/main/java/org/springframework/util/Log4jConfigurer.java @@ -41,7 +41,10 @@ import org.apache.log4j.xml.DOMConfigurator; * @since 13.03.2003 * @see org.springframework.web.util.Log4jWebConfigurer * @see org.springframework.web.util.Log4jConfigListener + * @deprecated as of Spring 4.2.1, in favor of Apache Log4j 2 + * (following Apache's EOL declaration for log4j 1.x) */ +@Deprecated public abstract class Log4jConfigurer { /** Pseudo URL prefix for loading from the class path: "classpath:" */ diff --git a/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java b/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java index cdc61780bd..92248680ec 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java @@ -30,7 +30,10 @@ import org.springframework.ui.ModelMap; * @since 2.5 * @see org.apache.log4j.NDC#push(String) * @see org.apache.log4j.NDC#pop() + * @deprecated as of Spring 4.2.1, in favor of Apache Log4j 2 + * (following Apache's EOL declaration for log4j 1.x) */ +@Deprecated public class Log4jNestedDiagnosticContextInterceptor implements AsyncWebRequestInterceptor { /** Logger available to subclasses */ diff --git a/spring-web/src/main/java/org/springframework/web/filter/Log4jNestedDiagnosticContextFilter.java b/spring-web/src/main/java/org/springframework/web/filter/Log4jNestedDiagnosticContextFilter.java index 982552fead..4691e62e04 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/Log4jNestedDiagnosticContextFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/Log4jNestedDiagnosticContextFilter.java @@ -36,7 +36,10 @@ import org.apache.log4j.NDC; * @see #setAfterMessageSuffix * @see org.apache.log4j.NDC#push(String) * @see org.apache.log4j.NDC#pop() + * @deprecated as of Spring 4.2.1, in favor of Apache Log4j 2 + * (following Apache's EOL declaration for log4j 1.x) */ +@Deprecated public class Log4jNestedDiagnosticContextFilter extends AbstractRequestLoggingFilter { /** Logger available to subclasses */ diff --git a/spring-web/src/main/java/org/springframework/web/util/Log4jConfigListener.java b/spring-web/src/main/java/org/springframework/web/util/Log4jConfigListener.java index ad38baa0df..a6ab9a5725 100644 --- a/spring-web/src/main/java/org/springframework/web/util/Log4jConfigListener.java +++ b/spring-web/src/main/java/org/springframework/web/util/Log4jConfigListener.java @@ -38,7 +38,10 @@ import javax.servlet.ServletContextListener; * @see Log4jWebConfigurer * @see org.springframework.web.context.ContextLoaderListener * @see WebAppRootListener + * @deprecated as of Spring 4.2.1, in favor of Apache Log4j 2 + * (following Apache's EOL declaration for log4j 1.x) */ +@Deprecated public class Log4jConfigListener implements ServletContextListener { @Override diff --git a/spring-web/src/main/java/org/springframework/web/util/Log4jWebConfigurer.java b/spring-web/src/main/java/org/springframework/web/util/Log4jWebConfigurer.java index 5fe7a6ae09..c1588f174d 100644 --- a/spring-web/src/main/java/org/springframework/web/util/Log4jWebConfigurer.java +++ b/spring-web/src/main/java/org/springframework/web/util/Log4jWebConfigurer.java @@ -19,7 +19,6 @@ package org.springframework.web.util; import java.io.FileNotFoundException; import javax.servlet.ServletContext; -import org.springframework.util.Log4jConfigurer; import org.springframework.util.ResourceUtils; import org.springframework.util.StringUtils; @@ -93,7 +92,10 @@ import org.springframework.util.StringUtils; * @since 12.08.2003 * @see org.springframework.util.Log4jConfigurer * @see Log4jConfigListener + * @deprecated as of Spring 4.2.1, in favor of Apache Log4j 2 + * (following Apache's EOL declaration for log4j 1.x) */ +@Deprecated public abstract class Log4jWebConfigurer { /** Parameter specifying the location of the log4j config file */ @@ -141,7 +143,7 @@ public abstract class Log4jWebConfigurer { // checking the file in the background. try { long refreshInterval = Long.parseLong(intervalString); - Log4jConfigurer.initLogging(location, refreshInterval); + org.springframework.util.Log4jConfigurer.initLogging(location, refreshInterval); } catch (NumberFormatException ex) { throw new IllegalArgumentException("Invalid 'log4jRefreshInterval' parameter: " + ex.getMessage()); @@ -149,7 +151,7 @@ public abstract class Log4jWebConfigurer { } else { // Initialize without refresh check, i.e. without log4j's watchdog thread. - Log4jConfigurer.initLogging(location); + org.springframework.util.Log4jConfigurer.initLogging(location); } } catch (FileNotFoundException ex) { @@ -167,7 +169,7 @@ public abstract class Log4jWebConfigurer { public static void shutdownLogging(ServletContext servletContext) { servletContext.log("Shutting down log4j"); try { - Log4jConfigurer.shutdownLogging(); + org.springframework.util.Log4jConfigurer.shutdownLogging(); } finally { // Remove the web app root system property.