Daily Archives: June 10, 2014
It’s quite straightforward to integrate Log4j into the Spring MVC application. First, include Log4j.jar library into your project dependency, then create a log4.properties file to define the Log4j’s appender and put this file into the project classpath, Done. In the tutorial, we show you how to integrate the Log4j 1.x logging framework into the Spring MVC application. Add Log4j Library to Your Project Download the Log4j library from the official website, or via Maven : Create log4j.properties Create a Log4j properties file (log4j.properties), put it into the project class path. see figure : File : log4j.properties – Define how log4j handles the logged message, in this example, it will redirect all the logged messages into a text. Use Log4j in…