Skip to content

Commit

Permalink
Bump Slf4j + Logback
Browse files Browse the repository at this point in the history
* For nessie-client: slf4j 1.7 + logback 1.3
* For Spark related: slf4j 1.7 + logback 1.3
* Other module: slf4j 2.0 + logback 1.4
  • Loading branch information
snazy committed Jun 15, 2023
1 parent 6db8a11 commit 00e5ee1
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 10 deletions.
7 changes: 5 additions & 2 deletions api/client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies {
compileOnly(libs.jakarta.ws.rs.api)
compileOnly(libs.javax.ws.rs)

implementation(libs.slf4j.api)
implementation(libs.slf4j.api.java8)
compileOnly(libs.errorprone.annotations)

compileOnly(libs.immutables.builder)
Expand Down Expand Up @@ -75,7 +75,10 @@ dependencies {
testFixturesApi("software.amazon.awssdk:auth")
testFixturesApi(libs.undertow.core)
testFixturesApi(libs.undertow.servlet)
testFixturesImplementation(libs.logback.classic)
testFixturesImplementation(libs.logback.classic.java8) {
// Logback 1.3 brings Slf4j 2.0, which doesn't work with Spark up to 3.3
exclude("org.slf4j", "slf4j-api")
}

testImplementation(libs.wiremock)

Expand Down
2 changes: 1 addition & 1 deletion events/service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
testImplementation(platform(libs.junit.bom))
testImplementation(libs.bundles.junit.testing)
testImplementation(libs.guava)
testImplementation(libs.logback.classic)
testRuntimeOnly(libs.logback.classic)

testCompileOnly(libs.microprofile.openapi)
}
11 changes: 9 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jacoco = "0.8.10"
jandex = "3.1.2"
jmh = "1.36"
junit = "5.9.3"
logback = "1.4.8"
logback_compat = "1.3.8" # For Java 8
maven = "3.9.2"
mavenResolver = "1.9.10"
mockito="4.11.0"
Expand All @@ -26,7 +28,8 @@ opentracing = "0.33.0"
picocli = "4.7.4"
protobuf = "3.23.2"
quarkus = "2.16.7.Final"
slf4j = "1.7.36"
slf4j = "2.0.7"
slf4j_compat = "1.7.36" # Spark up to 3.3 has a hard reference to org.slf4j.impl.StaticLoggerBinder
testcontainers = "1.18.3"
undertow = "2.2.24.Final"

Expand Down Expand Up @@ -117,7 +120,8 @@ jmh-generator-annprocess = { module = "org.openjdk.jmh:jmh-generator-annprocess"
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" }
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params" }
logback-classic = { module = "ch.qos.logback:logback-classic", version = "1.2.12" }
logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
logback-classic-java8 = { module = "ch.qos.logback:logback-classic", version.ref = "logback_compat" }
maven-core = { module = "org.apache.maven:maven-resolver-provider", version.ref = "maven" }
maven-resolver-connector-basic = { module = "org.apache.maven.resolver:maven-resolver-connector-basic", version.ref = "mavenResolver" }
maven-resolver-provider = { module = "org.apache.maven:maven-resolver-provider", version.ref = "maven" }
Expand Down Expand Up @@ -150,8 +154,11 @@ rocksdb-jni = { module = "org.rocksdb:rocksdbjni", version = "8.1.1.1" }
scala-library-v212 = { module = "org.scala-lang:scala-library", version = { strictly = "[2.12, 2.13[", prefer = "2.12.17" }}
scala-library-v213 = { module = "org.scala-lang:scala-library", version = { strictly = "[2.13, 2.14[", prefer = "2.13.10"}}
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
slf4j-api-java8 = { module = "org.slf4j:slf4j-api", version.ref = "slf4j_compat" }
slf4j-jcl-over-slf4j = { module = "org.slf4j:jcl-over-slf4j", version.ref = "slf4j" }
slf4j-jcl-over-slf4j-java8 = { module = "org.slf4j:jcl-over-slf4j", version.ref = "slf4j_compat" }
slf4j-log4j-over-slf4j = { module = "org.slf4j:log4j-over-slf4j", version.ref = "slf4j" }
slf4j-log4j-over-slf4j-java8 = { module = "org.slf4j:log4j-over-slf4j", version.ref = "slf4j_compat" }
spark-sql-v31-v212 = { module = "org.apache.spark:spark-sql_2_12", version = { strictly = "[3.1, 3.2[", prefer = "3.1.3"}}
spark-sql-v32-v212 = { module = "org.apache.spark:spark-sql_2_12", version = { strictly = "[3.2, 3.3[", prefer = "3.2.4"}}
spark-sql-v32-v213 = { module = "org.apache.spark:spark-sql_2_13", version = { strictly = "[3.2, 3.3[", prefer = "3.2.4"}}
Expand Down
7 changes: 5 additions & 2 deletions integrations/deltalake/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ dependencies {
testFixturesImplementation(platform(libs.jackson.bom))
testFixturesImplementation("com.fasterxml.jackson.core:jackson-databind")
testFixturesApi(libs.microprofile.openapi)
testFixturesImplementation(libs.logback.classic)
testFixturesImplementation(libs.slf4j.log4j.over.slf4j)
testFixturesImplementation(libs.logback.classic.java8) {
// Ancient logback for Deltalake (doesn't even work with Logback 1.3)...
version { strictly("1.2.12") }
}
testFixturesImplementation(libs.slf4j.log4j.over.slf4j.java8)
testFixturesCompileOnly(libs.errorprone.annotations)

testFixturesApi(platform(libs.junit.bom))
Expand Down
2 changes: 1 addition & 1 deletion integrations/iceberg-views/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies {
testImplementation(nessieProject("nessie-versioned-storage-testextension"))
testImplementation(nessieProject("nessie-versioned-storage-inmemory"))
testImplementation(nessieProject("nessie-jaxrs-testextension"))
testImplementation(libs.slf4j.log4j.over.slf4j)
testImplementation(libs.slf4j.log4j.over.slf4j.java8)
testCompileOnly(libs.microprofile.openapi)

testImplementation(platform(libs.junit.bom))
Expand Down
12 changes: 10 additions & 2 deletions integrations/spark-extensions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,16 @@ dependencies {
testFixturesImplementation("org.apache.iceberg:iceberg-spark-extensions-${sparkScala.sparkMajorVersion}_${sparkScala.scalaMajorVersion}:$versionIceberg")
testFixturesImplementation("org.apache.iceberg:iceberg-hive-metastore:$versionIceberg")

testFixturesRuntimeOnly(libs.logback.classic)
testFixturesImplementation(libs.slf4j.log4j.over.slf4j)
testFixturesRuntimeOnly(libs.logback.classic.java8) {
if (sparkScala.sparkMajorVersion == "3.1" || sparkScala.sparkMajorVersion == "3.2") {
// Ancient logback for Spark 3.1 + 3.2 (doesn't even work with Logback 1.3)...
version { strictly("1.2.12") }
} else {
// Logback 1.3 brings Slf4j 2.0, which doesn't work with Spark up to 3.3
exclude("org.slf4j", "slf4j-api")
}
}
testFixturesImplementation(libs.slf4j.log4j.over.slf4j.java8)
testFixturesImplementation("org.apache.spark:spark-sql_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }
testFixturesImplementation("org.apache.spark:spark-core_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }
testFixturesImplementation("org.apache.spark:spark-hive_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }
Expand Down

0 comments on commit 00e5ee1

Please sign in to comment.