Skip to content

Getting rid of internal SLF4J messages #451

Closed Answered by ppkarwasz
dglugla asked this question in Q&A
Discussion options

You must be logged in to vote

You should clean up your dependency stack from all SLF4J implementations, except the one you are using. If you use Maven, you can do it with
an enforcer rule like this one and fix all the errors using exclusions.

Unfortunately there is no Maven Enforcer rule counts the number of service implementations on your stack, so you need to ban them explicitly. If you use o.a.l.l:log4j-slf4j2-impl, you should ban:

  • c.q:logback-classic,
  • o.a.l.l:log4j-slf4j-impl,
  • o.s:slf4j-nop,
  • o.s:slf4j-simple,
  • o.s:slf4j-jdk14,
  • o.s:slf4j-reload4j.

Note: If you didn't add any of these dependencies explicitly to your runtime, you should check which dependency leaks them and report the issue to the appropriate projec…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dglugla
Comment options

@ppkarwasz
Comment options

@dglugla
Comment options

Answer selected by dglugla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants