Tag Archives: log4j

Integrate Spring MVC with Log4j

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…

Continue Reading
Contact Us
  • Nanyang Technological University, Singapore
  • root [at] haozhexie [dot] com