How To Install slf4j on Fedora 36

In this tutorial we learn how to install slf4j in Fedora 36. slf4j is Simple Logging Facade for Java

Introduction

In this tutorial we learn how to install slf4j on Fedora 36.

What is slf4j

The Simple Logging Facade for Java or (SLF4J) is intended to serve as a simple facade for various logging APIs allowing to the end-user to plug in the desired implementation at deployment time. SLF4J also allows for a gradual migration path away from Jakarta Commons Logging (JCL). Logging API implementations can either choose to implement the SLF4J interfaces directly, e.g. NLOG4J or SimpleLogger. Alternatively, it is possible (and rather easy) to write SLF4J adapters for the given API implementation, e.g. Log4jLoggerAdapter or JDK14LoggerAdapter..

We can use yum or dnf to install slf4j on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install slf4j.

Install slf4j on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install slf4j using dnf by running the following command:

sudo dnf -y install slf4j

Install slf4j on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install slf4j using yum by running the following command:

sudo yum -y install slf4j

How To Uninstall slf4j on Fedora 36

To uninstall only the slf4j package we can use the following command:

sudo dnf remove slf4j

slf4j Package Contents on Fedora 36

/usr/share/java/slf4j
/usr/share/java/slf4j/api.jar
/usr/share/java/slf4j/nop.jar
/usr/share/java/slf4j/simple.jar
/usr/share/java/slf4j/slf4j-api.jar
/usr/share/java/slf4j/slf4j-nop.jar
/usr/share/java/slf4j/slf4j-simple.jar
/usr/share/licenses/slf4j
/usr/share/licenses/slf4j/APACHE-LICENSE
/usr/share/licenses/slf4j/LICENSE.txt
/usr/share/maven-metadata/slf4j.xml
/usr/share/maven-poms/slf4j
/usr/share/maven-poms/slf4j/api.pom
/usr/share/maven-poms/slf4j/nop.pom
/usr/share/maven-poms/slf4j/simple.pom
/usr/share/maven-poms/slf4j/slf4j-api.pom
/usr/share/maven-poms/slf4j/slf4j-nop.pom
/usr/share/maven-poms/slf4j/slf4j-simple.pom

References

Summary

In this tutorial we learn how to install slf4j on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).