Logging is one of the essential concepts for any application development or testing process. For Selenium automation also, we have to log the necessary information into a file or database or any other storage medium.
Jars Download link: bit.ly/2W5J6lK
Properties file content reference: bit.ly/2sYyGZu
Conversion pattern explanation: bit.ly/2HmemK3
XML file content reference: bit.ly/2FBJMKM
What will we learn in this video:
---------------------------------------------------
1. What is logging?
2. Why do we need a logger?
3. How can we achieve logging in Java?
4. Log4j Components
5. Priority Levels
6. Different ways to configure log4j
1. What is logging?
Logging is the process of writing log messages during the execution of a program to a central place.
2. Why do we need Logs?
If we use SOP (System.out.print()) statements to print log messages We can print log messages on the console only. So, when the console is closed, we will lose all of those logs.
3. Log4j Components
a)Logger
b)Appender
c)Layout
4. Log4j priority levels:
debug, info, warn, error, fatal
5. Different ways to configure log4j:
a) Basic configurator
b) Property File Configurator
c) XML configurator (DOMConfigurator)
#LearnAutomationOnline #Java #Log4j #InDepth #50thVideo
Best way to reach me (replies will be faster): RU-vid comment section
Also, you can follow me on Facebook and Instagram.
Facebook: bit.ly/2TqPlis
Instagram: bit.ly/2Ez36rH
18 сен 2024