SLF4J

1

Simple Logging Facade for Java (SLF4J) provides a Java logging API by means of a simple facade pattern. The underlying logging backend is determined at runtime by adding the desired binding to the classpath and may be the standard Sun Java logging package java.util.logging, Log4j, Reload4j, Logback or tinylog. The separation of the client API from the logging backend reduces the coupling between an application and any particular logging framework. This can make it easier to integrate with existing or third-party code or to deliver code into other projects that have already made a choice of logging backend. SLF4J was created by Ceki Gülcü as a more reliable alternative to Jakarta Commons Logging framework. Research in 2013 on 10,000 GitHub projects found that the most popular Java library is SLF4J, along with JUnit, with 30.7% of projects using it. In January 2021, it was ranked as the second most popular project according to mvnrepository.

Similarities and differences with log4j 1.x

Similarities and differences with log4j 2.x

Apache log4j 2.x supports all slf4j features.

Version history

Version 2

Version 2.0.0 was released on 2022-08-20. The latest version 2 release is 2.0.9 (2023-09-03). Significant changes and feature additions:

Version 1

Version details can be found in the manual. Significant versions include:

This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.

Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc.
Bliptext is not affiliated with or endorsed by Wikipedia or the Wikimedia Foundation.

View original