Skip to content

LOGGING: Upgrade to Log4J 2.11.1 #32675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jts = 1.13
jackson = 2.8.6
snakeyaml = 1.15
# when updating log4j, please update also docs/java-api/index.asciidoc
log4j = 2.9.1
log4j = 2.11.1
slf4j = 1.6.2

# when updating the JNA version, also update the version in buildSrc/build.gradle
Expand Down
18 changes: 10 additions & 8 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ thirdPartyAudit.excludes = [
'com.fasterxml.jackson.dataformat.xml.JacksonXmlModule',
'com.fasterxml.jackson.dataformat.xml.XmlMapper',
'com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter',
'com.fasterxml.jackson.databind.node.JsonNodeFactory',
'com.fasterxml.jackson.databind.node.ObjectNode',
'org.fusesource.jansi.Ansi',
'org.fusesource.jansi.AnsiRenderer$Code',
'com.lmax.disruptor.BlockingWaitStrategy',
Expand Down Expand Up @@ -221,12 +219,6 @@ thirdPartyAudit.excludes = [
'javax.mail.internet.MimeMultipart',
'javax.mail.internet.MimeUtility',
'javax.mail.util.ByteArrayDataSource',
'javax.persistence.AttributeConverter',
'javax.persistence.EntityManager',
'javax.persistence.EntityManagerFactory',
'javax.persistence.EntityTransaction',
'javax.persistence.Persistence',
'javax.persistence.PersistenceException',
'org.apache.commons.compress.compressors.CompressorStreamFactory',
'org.apache.commons.compress.utils.IOUtils',
'org.apache.commons.csv.CSVFormat',
Expand Down Expand Up @@ -259,6 +251,16 @@ thirdPartyAudit.excludes = [
'org.noggit.JSONParser',
]

if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
// Used by Log4J 2.11.1
thirdPartyAudit.excludes += [
'java.io.ObjectInputFilter',
'java.io.ObjectInputFilter$Config',
'java.io.ObjectInputFilter$FilterInfo',
'java.io.ObjectInputFilter$Status'
]
}

if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
thirdPartyAudit.excludes += ['javax.xml.bind.DatatypeConverter']
}
Expand Down
1 change: 1 addition & 0 deletions core/licenses/log4j-1.2-api-2.11.1.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3aba3398fe064a3eab4331f88161c7480e848418
1 change: 0 additions & 1 deletion core/licenses/log4j-1.2-api-2.9.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions core/licenses/log4j-api-2.11.1.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
268f0fe4df3eefe052b57c87ec48517d64fb2a10
1 change: 0 additions & 1 deletion core/licenses/log4j-api-2.9.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions core/licenses/log4j-core-2.11.1.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
592a48674c926b01a9a747c7831bcd82a9e6d6e4
1 change: 0 additions & 1 deletion core/licenses/log4j-core-2.9.1.jar.sha1

This file was deleted.

4 changes: 2 additions & 2 deletions docs/java-api/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ You need to also include Log4j 2 dependencies:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.9.1</version>
<version>2.11.1</version>
</dependency>
--------------------------------------------------

Expand Down Expand Up @@ -98,7 +98,7 @@ If you want to use another logger than Log4j 2, you can use http://www.slf4j.org
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.9.1</version>
<version>2.11.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
1 change: 0 additions & 1 deletion plugins/repository-hdfs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ thirdPartyAudit.excludes = [
// we are not pulling in slf4j-ext, this is okay, Log4j will fallback gracefully
'org.slf4j.ext.EventData',

'org.apache.log4j.AppenderSkeleton',
'org.apache.log4j.AsyncAppender',
'org.apache.log4j.helpers.ISO8601DateFormat',
'org.apache.log4j.spi.ThrowableInformation',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4b41b53a3a2d299ce381a69d165381ca19f62912

This file was deleted.

10 changes: 10 additions & 0 deletions test/logger-usage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,13 @@ thirdPartyAudit.excludes = [
'org.osgi.framework.wiring.BundleWire',
'org.osgi.framework.wiring.BundleWiring'
]

if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
// Used by Log4J 2.11.1
thirdPartyAudit.excludes += [
'java.io.ObjectInputFilter',
'java.io.ObjectInputFilter$Config',
'java.io.ObjectInputFilter$FilterInfo',
'java.io.ObjectInputFilter$Status'
]
}