log4j是Apache的一個開源項目,陪伴了我們多年,但是現(xiàn)在已經(jīng)不更新了。官網(wǎng)原文如下:

  Log4j 1.x has been widely adopted and used in many applications. However, through the years development on it has slowed down. It has become more difficult to maintain due to its need to be compliant with very old versions of Java and became End of Life in August 2015. Its alternative, SLF4J/Logback made many needed improvements to the framework. So why bother with Log4j 2? Here are a few of the reasons.

一、log4j簡介

1、log4j支持.properties或xml這兩種文件類型的配置文件。

2、log4j只需要引入一個jar包即可:

<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version></dependency>

3、.properties配置文件屬性

網(wǎng)友評論