Skip to content

Commit f241a09

Browse files
iwasakimsjojochuang
andcommitted
HADOOP-18088. Replace log4j 1.x with reload4j.
Co-authored-by: Wei-Chiu Chuang <weichiu@apache.org>
1 parent 0fdcfe2 commit f241a09

File tree

26 files changed

+172
-55
lines changed

26 files changed

+172
-55
lines changed

NOTICE.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ framework, which can be obtained at:
223223
* HOMEPAGE:
224224
* http://commons.apache.org/logging/
225225

226-
This product optionally depends on 'Apache Log4J', a logging framework, which
226+
This product optionally depends on 'reload4j', a logging framework, which
227227
can be obtained at:
228228

229229
* LICENSE:
230-
* license/LICENSE.log4j.txt (Apache License 2.0)
230+
* license/LICENSE.reload4j.txt (Apache License 2.0)
231231
* HOMEPAGE:
232-
* http://logging.apache.org/log4j/
232+
* https://reload4j.qos.ch/
233233

234234
This product optionally depends on 'Aalto XML', an ultra-high performance
235235
non-blocking XML processor, which can be obtained at:
@@ -271,7 +271,7 @@ which has the following notices:
271271
* This product includes software from the Spring Framework,under the Apache License 2.0 (see: StringUtils.containsWhitespace())
272272

273273
The binary distribution of this product bundles binaries of
274-
Apache Log4j 1.2.17,
274+
reload4j 1.2.18.3,
275275
which has the following notices:
276276
* ResolverUtil.java
277277
Copyright 2005-2006 Tim Fennell

hadoop-assemblies/src/main/resources/assemblies/hadoop-hdfs-nfs-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<exclude>org.apache.hadoop:hadoop-hdfs</exclude>
3939
<!-- use slf4j from common to avoid multiple binding warnings -->
4040
<exclude>org.slf4j:slf4j-api</exclude>
41-
<exclude>org.slf4j:slf4j-log4j12</exclude>
41+
<exclude>org.slf4j:slf4j-reload4j</exclude>
4242
<exclude>org.hsqldb:hsqldb</exclude>
4343
</excludes>
4444
</dependencySet>

hadoop-assemblies/src/main/resources/assemblies/hadoop-mapreduce-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
<exclude>org.apache.hadoop:hadoop-hdfs</exclude>
182182
<!-- use slf4j from common to avoid multiple binding warnings -->
183183
<exclude>org.slf4j:slf4j-api</exclude>
184-
<exclude>org.slf4j:slf4j-log4j12</exclude>
184+
<exclude>org.slf4j:slf4j-reload4j</exclude>
185185
<exclude>org.hsqldb:hsqldb</exclude>
186186
</excludes>
187187
</dependencySet>

hadoop-assemblies/src/main/resources/assemblies/hadoop-nfs-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<exclude>org.apache.hadoop:hadoop-hdfs</exclude>
3939
<!-- use slf4j from common to avoid multiple binding warnings -->
4040
<exclude>org.slf4j:slf4j-api</exclude>
41-
<exclude>org.slf4j:slf4j-log4j12</exclude>
41+
<exclude>org.slf4j:slf4j-reload4j</exclude>
4242
<exclude>org.hsqldb:hsqldb</exclude>
4343
</excludes>
4444
</dependencySet>

hadoop-assemblies/src/main/resources/assemblies/hadoop-tools.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
<exclude>org.apache.hadoop:hadoop-pipes</exclude>
146146
<!-- use slf4j from common to avoid multiple binding warnings -->
147147
<exclude>org.slf4j:slf4j-api</exclude>
148-
<exclude>org.slf4j:slf4j-log4j12</exclude>
148+
<exclude>org.slf4j:slf4j-reload4j</exclude>
149149
</excludes>
150150
</dependencySet>
151151
</dependencySets>

hadoop-assemblies/src/main/resources/assemblies/hadoop-yarn-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
<exclude>com.fasterxml.jackson.core:*</exclude>
277277
<!-- use slf4j from common to avoid multiple binding warnings -->
278278
<exclude>org.slf4j:slf4j-api</exclude>
279-
<exclude>org.slf4j:slf4j-log4j12</exclude>
279+
<exclude>org.slf4j:slf4j-reload4j</exclude>
280280
<exclude>org.hsqldb:hsqldb</exclude>
281281
</excludes>
282282
</dependencySet>

hadoop-common-project/hadoop-auth-examples/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
<scope>compile</scope>
4949
</dependency>
5050
<dependency>
51-
<groupId>log4j</groupId>
52-
<artifactId>log4j</artifactId>
51+
<groupId>ch.qos.reload4j</groupId>
52+
<artifactId>reload4j</artifactId>
5353
<scope>runtime</scope>
5454
</dependency>
5555
<dependency>
5656
<groupId>org.slf4j</groupId>
57-
<artifactId>slf4j-log4j12</artifactId>
57+
<artifactId>slf4j-reload4j</artifactId>
5858
<scope>runtime</scope>
5959
</dependency>
6060
</dependencies>

hadoop-common-project/hadoop-auth/pom.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@
8888
<scope>compile</scope>
8989
</dependency>
9090
<dependency>
91-
<groupId>log4j</groupId>
92-
<artifactId>log4j</artifactId>
91+
<groupId>ch.qos.reload4j</groupId>
92+
<artifactId>reload4j</artifactId>
9393
<scope>runtime</scope>
9494
</dependency>
9595
<dependency>
9696
<groupId>org.slf4j</groupId>
97-
<artifactId>slf4j-log4j12</artifactId>
97+
<artifactId>slf4j-reload4j</artifactId>
9898
<scope>runtime</scope>
9999
</dependency>
100100
<dependency>
@@ -164,6 +164,10 @@
164164
<groupId>org.apache.directory.api</groupId>
165165
<artifactId>api-ldap-schema-data</artifactId>
166166
</exclusion>
167+
<exclusion>
168+
<groupId>log4j</groupId>
169+
<artifactId>log4j</artifactId>
170+
</exclusion>
167171
</exclusions>
168172
</dependency>
169173
<dependency>

hadoop-common-project/hadoop-common/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@
138138
<scope>compile</scope>
139139
</dependency>
140140
<dependency>
141-
<groupId>log4j</groupId>
142-
<artifactId>log4j</artifactId>
141+
<groupId>ch.qos.reload4j</groupId>
142+
<artifactId>reload4j</artifactId>
143143
<scope>compile</scope>
144144
</dependency>
145145
<dependency>
@@ -200,7 +200,7 @@
200200
</dependency>
201201
<dependency>
202202
<groupId>org.slf4j</groupId>
203-
<artifactId>slf4j-log4j12</artifactId>
203+
<artifactId>slf4j-reload4j</artifactId>
204204
<scope>compile</scope>
205205
</dependency>
206206
<dependency>

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericsUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.apache.hadoop.classification.InterfaceStability;
2626
import org.slf4j.Logger;
2727
import org.slf4j.LoggerFactory;
28-
import org.slf4j.impl.Log4jLoggerAdapter;
28+
import org.slf4j.impl.Reload4jLoggerAdapter;
2929

3030
/**
3131
* Contains utility methods for dealing with Java Generics.
@@ -85,6 +85,6 @@ public static boolean isLog4jLogger(Class<?> clazz) {
8585
return false;
8686
}
8787
Logger log = LoggerFactory.getLogger(clazz);
88-
return log instanceof Log4jLoggerAdapter;
88+
return log instanceof Reload4jLoggerAdapter;
8989
}
9090
}

0 commit comments

Comments
 (0)