Debugging the framework is an equally important activity when errors occur. Logging is the process of creating logs of the framework execution. Because of this, errors occurring during the execution can be easily diagnosed, since we know from the log about the last successful action that happened.
Log4j is an open source framework for logging. For using the Log4J framework, the following dependency has to be added in pom.xml:
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>test</scope>
</dependency>
Follow these steps to download the Log4J dependency:
- Save the pom.xml
- Right-click on Project and select Update Project
- The required dependency will get downloaded
In the case of...