[JAVA] What is SLF4J?

【background】

Stumble on an error What is SLF4J in the first place? I looked it up from that place.

[Error statement]

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

What is SLF4J?

SLF4J is a simple façade for logging systems that allows end users to plug in the desired logging system during deployment.

What is a façade?

The Facade class is a class that organizes a group of classes that are complicated to use and provides them to the outside as an easy-to-use interface. In the design pattern, the pattern that uses this Facade class is called the Facade pattern. (By the way, Facade is a word that means "window")

[Literal translation] Simple Logging Facade for Java (SLF4J) acts as a simple facade or abstraction for various logging frameworks (java.util.logging, logback, log4j, etc.) Allows end users to plug in the desired logging framework at deployment time.

Enabling the library on SLF4J is a single mandatory dependency, Note that this means adding slf4j-api.jar. If no binding is found in the classpath, SLF4J will default to a non-working implementation.

If you want to migrate Java source files to SLF4J Consider a migrator tool that can migrate your project to use the SLF4J API in minutes.

Binary support for SLF4J for legacy APIs, like commons logging, log4j, java.util.logging, if the externally maintained component you depend on uses a logging API other than SLF4J. Please take a look.

※important point If no binding is found in the classpath, SLF4J will default to a non-working implementation.

Summary

Referenced article (Thank you always.)

Organize the relationship between SLF4J, Logback, and Log4J along with their behavior.

Simple Logging Facade for Java (SLF4J)

Frequently Asked Questions about SLF4J

Facade pattern in java

Recommended Posts

What is SLF4J?
What is Cubby
What is Docker?
What is null? ]
What is java
What is Keycloak
What is maven?
What is Jackson?
What is Docker
What is self
What is Jenkins
What is IM-Juggling?
What is params
What is Facade? ??
What is Java <>?
What is Gradle?
What is POJO
What is Java
What is centOS
What is RubyGem?
What is programming?
What is before_action?
What is Docker
What is Byte?
What is Tomcat
What is Maven Assembly?
What is `docker-compose up`?
What is vue cli
What is an interface?
What is Ruby's self?
What is Ruby's attr_accessor?
What is Java Encapsulation?
What is permission denied?
What is instance control?
What is an initializer?
What is Spring Tools 4
What is an operator?
What is object orientation?
What is Guava's @VisibleForTesting?
What is MVC model?
What is an annotation?
What is Java technology?
What is Java API-java
What is @ (instance variable)?
What is Gradle's Artifact?
What is JPA Auditing?
[Swift] What is dismiss?
[Java] What is flatMap?
What is a Servlet?
What is web development?
[Java] What is JavaBeans?
[Android] What is Context? ??
[Java] What is ArrayList?
[Ruby] What is true?
What is object-oriented after all?
What is docker run -it?
What is Java Assertion? Summary.
[Memorandum] What is an error?
What is DI (Dependency Injection)
What is a wrapper class?
What is object-oriented programming? ~ Beginners ~