Discussions

Web tier: servlets, JSP, Web frameworks: commons.logging in struts

  1. commons.logging in struts (1 messages)

    we were using log4j earlier in web application.
    As i started working on struts,from API i find this package.
    can any one help me with sample example of using commons.logging package.
  2. commons.logging in struts[ Go to top ]

    Here is an example on how to obtain a logger instance:

    private static final Log LOG = LogFactory.getLog(MyClass.class);

    Then I use in the same way as a LOG4J logger instance.

    You can read about how commons-logging try to find a logger instance here: http://jakarta.apache.org/commons/logging/guide.html#Configuration

    Hope it helps