Log4j in SERVLET Step 1: Add dependencies in Pom.xml Log4j, Used Tomcat 6. Step2: Used Console and File Appenders. Saved in Properties files. Step3: Mentioned the path of Properties in Web.xml or use directly in program.