What is slf4j?

‹ Logging in Flink with Apache Beam | Installing PHP Composer with Docker ›

There are several commonly used logging frameworks in Java: log4j, java.util.logging, logback.  Because different projects may have dependencies on one or another of these frameworks, linking more than one project together can cause more than one logging framework to be linked.  SLF4J is an abstraction layer for these different logging frameworks.  If you make your own project only depend on SLF4J (and not log4j, java.util.logging or logback directly), when your code is included in another project, that project can select which logging framework to use simply by adding the appropriate SLF4J "binding" jar to its classpath.

Subscribe to All Posts - Wesley Tanaka