Jul 30th, 2007, 06:21 AM
Logging with Spring
I am developing a Spring application which is to be deployed in a Tomcat container. I know that both Spring and Tomcat use commons logging to log their debug/info messages. My requirement is to have a log file which is specific to my application and this log file would contain all the traces/debug messages which my application outputs. How do I achieve this in Spring ?
Jul 30th, 2007, 06:30 AM
Originally Posted by sudipto_podder
This is not Spring-specific issue, you achieve your goal by configuring logging engine behind the commons-logging (typically, log4j or JDK 1.4+ logging) in a usual way. Spring as well provide some additional support for this configuration with org.springframework.util.Log4jConfigurer, org.springframework.web.util.Log4jConfigListener, org.springframework.web.util.Log4jConfigServlet, org.springframework.web.util.Log4jWebConfigurer
which you are free to use (but are not obliged to).