Implementing Log4j2 for Java Application Logging - Step-by-Step Tutorial
Automation Step by Step via YouTube
Overview
Syllabus
00:00 Intro
00:27 Step 1 - Add Log4j2 Dependency - Log4j 2 is an improved version of Log4j with better performance & flexibility
04:33 Step 2 - Update dependencies by running: mvn clean install
05:12 Step 3 - Create log4j2.xml Configuration File in src/main/resources
08:46 Step 4 - Create a Logger Utility Class Log.java in src/main/java/utils
14:50 Step 5 - Integrate Logging into BaseTest.java
18:20 Step 6 - Integrate Logging into LoginPage.java
21:00 Step 8 - Run the Test and View Logs. Can also use cmd mvn test and check logs
Taught by
Automation Step by Step