Sudershan Sharma
Sudershan Sharma's Blog

Follow

Sudershan Sharma's Blog

Follow

5 EASIEST STEPS to Integrate Log4j2 with Spring Boot including JDBCAppender

Sudershan Sharma's photo
Sudershan Sharma
·Dec 3, 2022·

1 min read

By default, Spring Boot uses logback, but you can easily integrate log4j2 with Spring Boot by removing the Starter logging library and adding the Spring Boot log4j2 library. I have created a youtube video including adding JDBC Appender. The video has 5 Steps:

#1 Setup Log4j2

#2 Setup Basic properties & Log4j2.xml Configuration file

#3 Log4j2 Setup for Spring Profile

#4 Add JDBCAppender

#5 Add Custom columns

Hope it helps if you are looking to integrate log4j2 in Spring Boot.

 
Share this