How to implement Logging using Log4J

preview_player
Показать описание
00:00 *TOPICS*
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
14:50 Step 5 - Integrate Logging into BaseTest
18:20 Step 6 - Integrate Logging into LoginTest
20:51 Step 7 - Integrate Logging into LoginPage
21:00 Step 8 - Run the Test and View Logs. Can also use cmd mvn test and check logs

Usage of Logging Levels:
info() → General information
warn() → Warnings
error() → Errors
debug() → Debugging details

▬▬▬▬▬▬▬

Share with all who may need this

If my work has helped you, consider helping any animal near you, in any way you can

Never Stop Learning
Raghav Pal

▬▬▬▬ USEFUL LINKS ▬▬▬▬

✅ CI | CD | DEVOPS

✅ WEB TESTING

✅ API TESTING

✅ MOBILE TESTING

✅ PERFORMANCE TESTING

✅ SOURCE CODE MANAGEMENT

✅ IDE

✅ PROGRAMMING

✅ BUILD TOOLS

✅ CLOUD SERVICES

✅ PROJECT MANAGEMENT

✅ DATA FORMATS

✅ OTHERS

🙌 Connect with Raghav:


Рекомендации по теме
Комментарии
Автор

Really Great Knowledge Sharing Platform .

vishuyadav
Автор

Hi Raghav, thank you for your efforts and valuable lessons. They are so helpful to me and to others. Can you please do a series on Playwright with Python? Thank you!

JohnBlaze-qj
Автор

Raghav.Thank you for creating this video.This is very helpful.
Have follow up questions on log4j.
a) if we have exception reporting feature what is the use of adding log4j?
b) I see log4j logs in console and file.If we are not appending results in the file and everytime the content is overwritten i believe it will store logs for the current execution
c) Do we have ability to add these logs logged into reports like TestNG execution report

Please let me know.

jsathyanarayana
join shbcf.ru