lombok slf4j configuration

You also have the option of using YAML or JSON with Log4j2. Step 1 - Create an object of the slf4j.Logger interface Since the slf4j.Logger is the entry point of the SLF4J API, first, you need to get/create its object The getLogger () method of the LoggerFactory class accepts a string value representing a name and returns a Logger object with the specified name. In this tutorial we will walk through a simple Lombok Spring Boot example application that integrates with Lombok to demonstrate how to start working with Spring Boot and Lombok together. 1. Overview. To follow along with this article, the reader should have the following: Java language prior knowledge; Java SDK installed on the machine. SLF4J stands for Simple Logging Facade for Java. Example: @Slf4j public class LogExample { } will generate: public class LogExample { private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger (LogExample.class); } This annotation is valid for classes and enumerations. Spring Boot will pick up all custom configuration using log4j2.xml as long as it is in the application class path. -->