Skip to content
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

Update to slf4j 2.0.2 #6774

Merged
merged 4 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 6 additions & 6 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ val CORE_DEPENDENCIES = listOf(
"org.mockito:mockito-core:4.8.0",
"org.mockito:mockito-junit-jupiter:4.8.0",
"org.mockito:mockito-inline:4.8.0",
"org.slf4j:slf4j-api:1.7.36",
"org.slf4j:slf4j-simple:1.7.36",
"org.slf4j:log4j-over-slf4j:1.7.36",
"org.slf4j:jcl-over-slf4j:1.7.36",
"org.slf4j:jul-to-slf4j:1.7.36"
"org.slf4j:slf4j-api:2.0.2",
"org.slf4j:slf4j-simple:2.0.2",
"org.slf4j:log4j-over-slf4j:2.0.2",
"org.slf4j:jcl-over-slf4j:2.0.2",
"org.slf4j:jul-to-slf4j:2.0.2"
)

// See the comment above about why we keep this rather large list.
// There are dependencies included here that appear to have no usages, but are maintained at
// this top level to help consistently satisfy large numbers of transitive dependencies.
val DEPENDENCIES = listOf(
"ch.qos.logback:logback-classic:1.2.11",
"ch.qos.logback:logback-classic:1.3.1", // 1.4+ requires Java 11+
"com.github.stefanbirkner:system-lambda:1.2.1",
"com.github.stefanbirkner:system-rules:1.19.0",
"uk.org.webcompere:system-stubs-jupiter:2.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,11 @@ tasks {
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
12 changes: 10 additions & 2 deletions instrumentation/dropwizard/dropwizard-testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,13 @@ dependencies {
testImplementation("com.fasterxml.jackson.module:jackson-module-afterburner")
}

// Requires old Guava. Can't use enforcedPlatform since predates BOM
configurations.testRuntimeClasspath.resolutionStrategy.force("com.google.guava:guava:19.0")
configurations.testRuntimeClasspath {
resolutionStrategy {
// Requires old Guava. Can't use enforcedPlatform since predates BOM
force("com.google.guava:guava:19.0")

// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
8 changes: 8 additions & 0 deletions instrumentation/grails-3.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ configurations.configureEach {
}
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}

tasks.withType<Test>().configureEach {
// required on jdk17
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@ tasks.withType<Test>().configureEach {
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ tasks {

withType<Test>().configureEach {
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@ tasks {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,19 @@ tasks {
dependsOn(testing.suites)
}
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}

configurations.named("testNoReceiveTelemetryRuntimeClasspath") {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-test:2.5.3")
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ dependencies {
tasks.withType<Test>().configureEach {
jvmArgs("-Djava.rmi.server.hostname=127.0.0.1")
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,11 @@ tasks.withType<Test>().configureEach {

systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,11 @@ tasks.withType<Test>().configureEach {
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ dependencies {
exclude("org.junit.vintage", "junit-vintage-engine")
}
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,11 @@ tasks.withType<Test>().configureEach {
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
42 changes: 41 additions & 1 deletion instrumentation/vaadin-14.2/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tasks {
if (findProperty("testLatestDeps") as Boolean) {
dependsOn(vaadin14LatestTest)
}
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}

Expand All @@ -72,3 +72,43 @@ dependencies {
// add("latestDepTestImplementation", "com.vaadin:vaadin-spring-boot-starter:+")
add("latestDepTestImplementation", "com.vaadin:vaadin-spring-boot-starter:23.1.+")
}

configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}

configurations.named("vaadin142TestRuntimeClasspath") {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}

configurations.named("vaadin14LatestTestRuntimeClasspath") {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}

configurations.named("vaadin16TestRuntimeClasspath") {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}

configurations.named("latestDepTestRuntimeClasspath") {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would something like

Suggested change
configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
configurations.named("vaadin142TestRuntimeClasspath") {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
configurations.named("vaadin14LatestTestRuntimeClasspath") {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
configurations.named("vaadin16TestRuntimeClasspath") {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
configurations.named("latestDepTestRuntimeClasspath") {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
configurations {
listOf(testRuntimeClasspath,
named("vaadin142TestRuntimeClasspath"),
named("vaadin14LatestTestRuntimeClasspath"),
named("vaadin16TestRuntimeClasspath"),
named("latestDepTestRuntimeClasspath"))
.forEach {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
}

work? (same in the spring-kafka build file)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

6 changes: 2 additions & 4 deletions javaagent-internal-logging-simple/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ plugins {

group = "io.opentelemetry.javaagent"

val agentSlf4jVersion = "2.0.0"

dependencies {
compileOnly(project(":javaagent-bootstrap"))
compileOnly(project(":javaagent-tooling"))

implementation("org.slf4j:slf4j-api:$agentSlf4jVersion")
implementation("org.slf4j:slf4j-simple:$agentSlf4jVersion")
implementation("org.slf4j:slf4j-api")
implementation("org.slf4j:slf4j-simple")

annotationProcessor("com.google.auto.service:auto-service")
compileOnly("com.google.auto.service:auto-service-annotations")
Expand Down
6 changes: 3 additions & 3 deletions licenses/licenses.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.