Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Adding the commons-logger dependency to your project.xml
    1. Add the following to the dependencies block of your project.xml file to include the commons-logger:
      Code Block
      xml
      xml
      
      <dependency>
      	<groupId>commons-logging</groupId>
      	<artifactId>commons-logging</artifactId>
      	<version>1.0.4</version>
      </dependency>
      
      • The commons logger is included in shared/lib by Sakai itself so you do not need to package it in your tool war file (hence there is no <war.bundle>true</war.bundle>)
      • Version 1.0.4 was the current version when this was written
  2. Adding the logger to your code
    1. Add the following line just below your class line:
      Code Block
      private static Log log = LogFactory.getLog(TaskListManagerDaoImplMyClass.class);
      
      • Make sure your class name is listed in place of MyClass
    2. The commons logger requires 2 imports (eclipse will insert these for you):
      Code Block
      
      import org.apache.commons.logging.Log;
      import org.apache.commons.logging.LogFactory;