Skip to content

fix: Make slf4j work along with log4j2 #123

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
Oct 6, 2020
Merged

Conversation

pankajagrawal16
Copy link
Contributor

@pankajagrawal16 pankajagrawal16 commented Oct 6, 2020

Issue #, if available:

Description of changes:

Fixes warning like below:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
-- | --
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@msailes msailes left a comment

Choose a reason for hiding this comment

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

approve

Copy link
Contributor

@jeromevdl jeromevdl left a comment

Choose a reason for hiding this comment

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

OK.

Just to remember, if SLF4J version is >= 1.8, then we should use log4j-slf4j18-impl instead,

see https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/

@pankajagrawal16
Copy link
Contributor Author

OK.

Just to remember, if SLF4J version is >= 1.8, then we should use log4j-slf4j18-impl instead,

see https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/

Good point, Currently this is good:

[INFO] |  +- software.amazon.awssdk:profiles:jar:2.15.2:compile
[INFO] |  +- software.amazon.awssdk:sdk-core:jar:2.15.2:compile
[INFO] |  |  +- org.slf4j:slf4j-api:jar:1.7.28:compile
[INFO] |  |  \- org.reactivestreams:reactive-streams:jar:1.0.2:compile

@pankajagrawal16 pankajagrawal16 merged commit b302732 into master Oct 6, 2020
@pankajagrawal16 pankajagrawal16 deleted the slf4j-warning branch October 6, 2020 11:02
jeromevdl pushed a commit to jeromevdl/aws-lambda-powertools-java that referenced this pull request Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants