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

Added lost slf4j, logback, log4j versions #8968

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 14 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ kotlin-coroutines = "1.6.4"
ktor = "1.6.8"
managed-logback = "1.4.6"
logbook-netty = "2.14.0"
log4j = "2.19.0"
micronaut-aws = "3.9.2"
micronaut-groovy = "4.0.0-SNAPSHOT"
micronaut-session = "1.0.0-SNAPSHOT"
Expand Down Expand Up @@ -72,6 +71,7 @@ managed-reactive-streams = "1.0.4"
# This should be kept aligned with https://github.com/micronaut-projects/micronaut-reactor/blob/master/gradle.properties from the BOM
managed-reactor = "3.4.24"
managed-slf4j = "2.0.4"
managed-log4j = "2.19.0"
managed-snakeyaml = "2.0"
managed-java-parser-core = "3.24.9"
managed-ksp = "1.8.0-1.0.9"
Expand All @@ -87,6 +87,7 @@ test-boms-micronaut-validation = { module = "io.micronaut.validation:micronaut-v
boms-groovy = { module = "org.apache.groovy:groovy-bom", version.ref = "managed-groovy" }
boms-netty = { module = "io.netty:netty-bom", version.ref = "managed-netty" }
boms-jackson = { module = "com.fasterxml.jackson:jackson-bom", version.ref = "managed-jackson" }
boms-log4j = { module = "org.apache.logging.log4j:log4j-bom", version.ref = "managed-log4j" }

#
# Libraries which start with managed- are managed by Micronaut in the sense
Expand Down Expand Up @@ -130,7 +131,18 @@ managed-reactor-test = { module = "io.projectreactor:reactor-test", version.ref

managed-slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "managed-slf4j" }
managed-slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "managed-slf4j" }
managed-slf4j-nop = { module = "org.slf4j:slf4j-nop", version.ref = "managed-slf4j" }
managed-slf4j-log4j12 = { module = "org.slf4j:slf4j-log4j12", version.ref = "managed-slf4j" }
managed-slf4j-reload4j = { module = "org.slf4j:slf4j-reload4j", version.ref = "managed-slf4j" }
managed-slf4j-ext = { module = "org.slf4j:slf4j-ext", version.ref = "managed-slf4j" }
managed-slf4j-jcl-over-slf4j = { module = "org.slf4j:jcl-over-slf4j", version.ref = "managed-slf4j" }
managed-slf4j-log4j-over-slf4j = { module = "org.slf4j:log4j-over-slf4j", version.ref = "managed-slf4j" }
managed-slf4j-jul-to-slf4j = { module = "org.slf4j:jul-to-slf4j", version.ref = "managed-slf4j" }
managed-slf4j-osgi-over-slf4j = { module = "org.slf4j:osgi-over-slf4j", version.ref = "managed-slf4j" }

managed-logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "managed-logback" }
managed-logback-core = { module = "ch.qos.logback:logback-core", version.ref = "managed-logback" }
managed-logback-access = { module = "ch.qos.logback:logback-access", version.ref = "managed-logback" }

managed-snakeyaml = { module = "org.yaml:snakeyaml", version.ref = "managed-snakeyaml" }

Expand Down Expand Up @@ -207,7 +219,7 @@ kotlinx-coroutines-rx2 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-rx
kotlinx-coroutines-slf4j = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-slf4j", version.ref = "kotlin-coroutines" }
kotlinx-coroutines-reactor = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-reactor", version.ref = "kotlin-coroutines" }

log4j = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" }
log4j = { module = "org.apache.logging.log4j:log4j-core", version.ref = "managed-log4j" }
Copy link
Contributor

Choose a reason for hiding this comment

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

❌ This should be managed too, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@melix Yes, it's necessary. For example, if you want to use slf4j in your project in conjunction with micronaut-elasticsearch - for this you will need the 'org.apache.logging.log4j:log4j-to-slf4j:2.20.0' library and at the moment you will have to duplicate the log4j version in your project because this module is not in the bom file. We already discussed this here: #8138 . And now everything works fine with version 3.7.x. But these changes are lost in version 4.x

Copy link
Collaborator

Choose a reason for hiding this comment

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

@altro3 we moved versions outside of core intentionally in 4.0.x. I think micronaut-logging is probably the way to go.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sdelamo good solution! But where is project micronaut-logging? :-)


logbook-netty = { module = "org.zalando:logbook-netty", version.ref = "logbook-netty" }

Expand Down