From 2e63a13c0a653bdc7a28939c9d2537b75f571990 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 22 Sep 2017 11:57:06 -0400 Subject: [PATCH] Upgrade to Log4j 2.9.1 This commit upgrades the Log4j dependency, picking up a fix for an issue with handling stack traces on JDK 9. Relates #26750 --- buildSrc/version.properties | 4 +--- core/licenses/log4j-1.2-api-2.9.0.jar.sha1 | 1 - core/licenses/log4j-1.2-api-2.9.1.jar.sha1 | 1 + core/licenses/log4j-api-2.9.0.jar.sha1 | 1 - core/licenses/log4j-api-2.9.1.jar.sha1 | 1 + core/licenses/log4j-core-2.9.0.jar.sha1 | 1 - core/licenses/log4j-core-2.9.1.jar.sha1 | 1 + docs/java-api/index.asciidoc | 4 ++-- .../licenses/log4j-slf4j-impl-2.9.0.jar.sha1 | 1 - .../licenses/log4j-slf4j-impl-2.9.1.jar.sha1 | 1 + .../common/logging/EvilLoggerTests.java | 15 --------------- 11 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 core/licenses/log4j-1.2-api-2.9.0.jar.sha1 create mode 100644 core/licenses/log4j-1.2-api-2.9.1.jar.sha1 delete mode 100644 core/licenses/log4j-api-2.9.0.jar.sha1 create mode 100644 core/licenses/log4j-api-2.9.1.jar.sha1 delete mode 100644 core/licenses/log4j-core-2.9.0.jar.sha1 create mode 100644 core/licenses/log4j-core-2.9.1.jar.sha1 delete mode 100644 plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.9.0.jar.sha1 create mode 100644 plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.9.1.jar.sha1 diff --git a/buildSrc/version.properties b/buildSrc/version.properties index 329a1a9e4a2ad..f2a953753a506 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -8,9 +8,7 @@ jts = 1.13 jackson = 2.8.6 snakeyaml = 1.15 # when updating log4j, please update also docs/java-api/index.asciidoc -# when updating this version, please check if https://github.com/apache/logging-log4j2/pull/109 is released into the version that you are -# bumping to; if it is, remove the assumeTrues in EvilLoggerTests -log4j = 2.9.0 +log4j = 2.9.1 slf4j = 1.6.2 # when updating the JNA version, also update the version in buildSrc/build.gradle diff --git a/core/licenses/log4j-1.2-api-2.9.0.jar.sha1 b/core/licenses/log4j-1.2-api-2.9.0.jar.sha1 deleted file mode 100644 index 43b49b4d550de..0000000000000 --- a/core/licenses/log4j-1.2-api-2.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7e2f1637394eecdc3c8cd067b3f2cf4801b1bcf6 \ No newline at end of file diff --git a/core/licenses/log4j-1.2-api-2.9.1.jar.sha1 b/core/licenses/log4j-1.2-api-2.9.1.jar.sha1 new file mode 100644 index 0000000000000..0b5acc62b7a13 --- /dev/null +++ b/core/licenses/log4j-1.2-api-2.9.1.jar.sha1 @@ -0,0 +1 @@ +894f96d677880d4ab834a1356f62b875e579caaa \ No newline at end of file diff --git a/core/licenses/log4j-api-2.9.0.jar.sha1 b/core/licenses/log4j-api-2.9.0.jar.sha1 deleted file mode 100644 index e6e9c445ad136..0000000000000 --- a/core/licenses/log4j-api-2.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e0dcd508dfc4864a2f5a1963d6ffad170d970375 \ No newline at end of file diff --git a/core/licenses/log4j-api-2.9.1.jar.sha1 b/core/licenses/log4j-api-2.9.1.jar.sha1 new file mode 100644 index 0000000000000..e1a89fadfed95 --- /dev/null +++ b/core/licenses/log4j-api-2.9.1.jar.sha1 @@ -0,0 +1 @@ +7a2999229464e7a324aa503c0a52ec0f05efe7bd \ No newline at end of file diff --git a/core/licenses/log4j-core-2.9.0.jar.sha1 b/core/licenses/log4j-core-2.9.0.jar.sha1 deleted file mode 100644 index ecd8fbace6758..0000000000000 --- a/core/licenses/log4j-core-2.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -052f6548ae1688e126c29b5dc400929dc0128615 \ No newline at end of file diff --git a/core/licenses/log4j-core-2.9.1.jar.sha1 b/core/licenses/log4j-core-2.9.1.jar.sha1 new file mode 100644 index 0000000000000..990ea322a7613 --- /dev/null +++ b/core/licenses/log4j-core-2.9.1.jar.sha1 @@ -0,0 +1 @@ +c041978c686866ee8534f538c6220238db3bb6be \ No newline at end of file diff --git a/docs/java-api/index.asciidoc b/docs/java-api/index.asciidoc index af375813d42aa..5f5de5eb1a908 100644 --- a/docs/java-api/index.asciidoc +++ b/docs/java-api/index.asciidoc @@ -83,7 +83,7 @@ You need to also include Log4j 2 dependencies: org.apache.logging.log4j log4j-core - 2.9.0 + 2.9.1 -------------------------------------------------- @@ -111,7 +111,7 @@ If you want to use another logger than Log4j 2, you can use http://www.slf4j.org org.apache.logging.log4j log4j-to-slf4j - 2.9.0 + 2.9.1 org.slf4j diff --git a/plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.9.0.jar.sha1 b/plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.9.0.jar.sha1 deleted file mode 100644 index 85d3c6534d700..0000000000000 --- a/plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1bd7f6b6ddbaf8a21d6c2b288d0cc5bc5b791cc0 \ No newline at end of file diff --git a/plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.9.1.jar.sha1 b/plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.9.1.jar.sha1 new file mode 100644 index 0000000000000..66119e87e211f --- /dev/null +++ b/plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.9.1.jar.sha1 @@ -0,0 +1 @@ +0a97a849b18b3798c4af1a2ca5b10c66cef17e3a \ No newline at end of file diff --git a/qa/evil-tests/src/test/java/org/elasticsearch/common/logging/EvilLoggerTests.java b/qa/evil-tests/src/test/java/org/elasticsearch/common/logging/EvilLoggerTests.java index b404e75c7e81e..97692e5ea6b6e 100644 --- a/qa/evil-tests/src/test/java/org/elasticsearch/common/logging/EvilLoggerTests.java +++ b/qa/evil-tests/src/test/java/org/elasticsearch/common/logging/EvilLoggerTests.java @@ -78,9 +78,6 @@ public void tearDown() throws Exception { } public void testLocationInfoTest() throws IOException, UserException { - assumeTrue( - "will be fixed when https://github.com/apache/logging-log4j2/pull/109 is integrated into to Log4j and we bump versions", - !Constants.JRE_IS_MINIMUM_JAVA9); setupLogging("location_info"); final Logger testLogger = ESLoggerFactory.getLogger("test"); @@ -107,9 +104,6 @@ public void testLocationInfoTest() throws IOException, UserException { } public void testDeprecationLogger() throws IOException, UserException { - assumeTrue( - "will be fixed when https://github.com/apache/logging-log4j2/pull/109 is integrated into to Log4j and we bump versions", - !Constants.JRE_IS_MINIMUM_JAVA9); setupLogging("deprecation"); final DeprecationLogger deprecationLogger = new DeprecationLogger(ESLoggerFactory.getLogger("deprecation")); @@ -137,9 +131,6 @@ public void testDeprecationLogger() throws IOException, UserException { } public void testConcurrentDeprecationLogger() throws IOException, UserException, BrokenBarrierException, InterruptedException { - assumeTrue( - "will be fixed when https://github.com/apache/logging-log4j2/pull/109 is integrated into to Log4j and we bump versions", - !Constants.JRE_IS_MINIMUM_JAVA9); setupLogging("deprecation"); final DeprecationLogger deprecationLogger = new DeprecationLogger(ESLoggerFactory.getLogger("deprecation")); @@ -217,9 +208,6 @@ public void testConcurrentDeprecationLogger() throws IOException, UserException, } public void testDeprecationLoggerMaybeLog() throws IOException, UserException { - assumeTrue( - "will be fixed when https://github.com/apache/logging-log4j2/pull/109 is integrated into to Log4j and we bump versions", - !Constants.JRE_IS_MINIMUM_JAVA9); setupLogging("deprecation"); final DeprecationLogger deprecationLogger = new DeprecationLogger(ESLoggerFactory.getLogger("deprecation")); @@ -263,9 +251,6 @@ public void testDeprecationLoggerMaybeLog() throws IOException, UserException { } public void testDeprecatedSettings() throws IOException, UserException { - assumeTrue( - "will be fixed when https://github.com/apache/logging-log4j2/pull/109 is integrated into to Log4j and we bump versions", - !Constants.JRE_IS_MINIMUM_JAVA9); setupLogging("settings"); final Setting setting = Setting.boolSetting("deprecated.foo", false, Setting.Property.Deprecated);