How To Install slf4j on CentOS 7
Introduction
In this tutorial we learn how to install slf4j
on CentOS 7.
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 CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install slf4j.
Install slf4j on CentOS 7 Using yum
Update yum database with yum
using the following command.
After updating yum database, We can install slf4j
using yum
by running the following command:
Install slf4j on CentOS 7 Using dnf
If you don’t have dnf installed you can install DNF on CentOS 7 first.
Update yum database with dnf
using the following command.
After updating yum database, We can install slf4j
using dnf
by running the following command:
How To Uninstall slf4j on CentOS 7
To uninstall only the slf4j
package we can use the following command:
References
Summary
In this tutorial we learn how to install slf4j
on CentOS 7 using yum
and dnf
.