-
Notifications
You must be signed in to change notification settings - Fork 88
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
test: Roll SLF4J log4j bindings to v2 #1190
Conversation
@jeromevdl what do you think? This seems pretty harmless to me, and the slf4j upgrade-to-v2 FAQ lists it as a non-breaking change. I have also tried to document explicitly on this PR the state of logging in the repo and our long term plans here. |
Codecov ReportPatch and project coverage have no change.
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #1190 +/- ##
=========================================
Coverage 70.87% 70.87%
Complexity 541 541
=========================================
Files 72 72
Lines 2328 2328
Branches 254 254
=========================================
Hits 1650 1650
Misses 558 558
Partials 120 120 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see that some of our code couples against it instead of log4j. I don't know if it was initially an autocomplete accident or good intentions ("we should be using slf4j not log4j"). |
@scottgerring anything else to do on this one? it is marked as draft... |
Bumps [constructs](https://github.com/aws/constructs) from 10.2.47 to 10.2.55. - [Release notes](https://github.com/aws/constructs/releases) - [Commits](aws/constructs@v10.2.47...v10.2.55) --- updated-dependencies: - dependency-name: software.constructs:constructs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Issue #, if available: #1180
Description of changes:
We generally couple directly against Log4j, but in a couple of places we write to the slf4j API, which is then adapted back to log4j by log4j's
log4j-slf4j-impl
package:https://github.com/awslabs/aws-lambda-powertools-java/blob/76ca20f2df7631b6cf4eaed852a55ab95f27be1d/powertools-serialization/pom.xml#L52-L55
Because this adapter is being pulled in by our code and is using slf4j-v1, customers using slf4j-v2 themselves can have issues using the powertools (see #1180). This PR switches the adapter to slf4j-v2.
Long term we intend to switch to slf4j (#995, #965), rather than coupling directly against log4j. As this will be a breaking change, it has been earmarked for powertools for java v2.
Checklist
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.