Announcement Announcement Module
Collapse
No announcement yet.
Logging with Spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment

    Working...
    X