First of all, we need to understand what Maven is. A Maven is a tool for building java based project that offers several benefits and options by making build processes powerful, understandable and easy. Maven takes care of downloading all necessary dependencies and including them correctly in the project. Maven is the part of the Apache Software Foundation.
Following are the most basic steps to configure log4j logging support in our project:
1) Create a Maven Project:
2) Update the pom.xml file:
Add the following given dependencies to pom.xml file, or you can go to the following URL: https://mvnrepository.com/artifact/log4j/log4j/1.2.17
3) Sample Class for Logger:
4) Run the Program: