Results 1 to 2 of 2

Thread: Logging with Spring

  1. #1

    Default Logging with Spring

    Hi,
    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 ?

    Regards,
    Sudipto

  2. #2
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Default

    Quote Originally Posted by sudipto_podder View Post
    Hi,
    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 ?

    Regards,
    Sudipto

    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).

    Regards,
    Oleksandr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •