Create Log4j project by using Maven dependency

5 Easy steps to create Log4j project using Maven dependency

Step 1) Create maven project. Follow the steps given in this post to create Maven Project

Step 2) Get Log4j by adding below dependency in pom.xml and build the project

Steps 3) Create file inside src/main/resources folder

Step 4) Write class to log the messages

Step 5) Right click and execute. You should get below output.


Leave a Reply

Your email address will not be published. Required fields are marked *