spring建议用log4j2 来替换这个类。以下为官方原文
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
extends java.lang.Object
implements ServletContextListener
于是看了一下log4j2,实现过程记录一下:
首先引入全新的log4j2 依赖jar包
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.10.0</version>
</dependency>