Selenium Framework for Beginners 15 | How to add Log4j xml file in Java project

preview_player
Показать описание

What is Log4j
Log4j is a java based logging framework
Is simple, flexible, reliable and fast
Is configured through a configuration file

Practical Example

Step 1:Add Log4j libraries in the java project
Can add jar files or maven dependency

Step 2 : Create reference for Logger in the class
Class where you want to add log statements

What is the difference ?

Step 4 : Run and Validate

REFERENCES

Like, Subscribe & Share
You can support my mission for education by sharing this knowledge and helping as many people as you can

------------ UI TESTING ------------

------------ API TESTING ------------

------------ MOBILE TESTING ------------

------------ CI | CD | DEVOPS ------------

------------ VERSION CONTROL SYSTEM ------------

------------ PERFORMANCE TESTING ------------

------------ PROGRAMMING ------------

------------ IDE ------------

------------ MAVEN ------------

------------ OTHERS ------------

Keep Learning,
Raghav

----------- Connect with Raghav ------------

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

Excellent tutorial. I spent one entire day to get this done only to finish in 10 minutes after watching this video. Thank you so much Raghav.

divyabhandary
Автор

Automation step by step is my goto place for all the technical stuff related knowledge 🙏🏼💐 thank you Raghav ji 🤝

sharaarath
Автор

sir, the way u deliver the concepts is great.Thank you....

amnamubasu
Автор

Raghav you are doing great job..Please keep doing it..

mithilkumarp.a.
Автор

i've been following you for a month now, its been great learning from your videos thanks alot.... ill never forget any concepts now

zahidullaghouri
Автор

Nice videos, very detailed, easy to follow and implement...Thank you so much Raghav

sumankodali
Автор

Why do you make such easy videos? I am new to the channel... it's awesome... keep rocking Bro!!!

shyamvittal
Автор

Thank you for very good video. God Bless You

WorkWork-edvc
Автор

Hi Raghav,
What changes should I make in log4j2.xml file for not to append in the log file as you have mentioned in you previous video(appender.file.append= false)?
Thank You.

surajsurya
Автор

In real time in which scenario log4j is used ?

venkatasubramaniam
Автор

How to give file path like c:/logs/project1.log in properties file

spnarayanrao
Автор

Hi Sir,
If the logger level is set as info and the root level is set as error like below, if i do log.info will it print ?
<Loggers>
<Logger additivity="false" level="info">
<AppenderRef ref="traceLog" />
<AppenderRef ref="Console" />
</Logger>
<Root level="error">
<AppenderRef ref="Console"/>
</Root>
</Loggers>

subhaneilsengupta
Автор

How can i get a new log file every time when i execute...?

mayurkhare
Автор

Hi sir, logs are generating if i run the program with eclipse but logs are not generating with executable jar file. Please help! I've selenium project

RajeshKumar-szci