Mark log4j support classes as deprecated in favor of Apache Log4j 2 (following Apache's EOL declaration for log4j 1.x)
Issue: SPR-13400
This commit is contained in:
parent
b9d7913407
commit
e518d7dcc6
|
|
@ -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:" */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue