2 Replies Latest reply on Nov 24, 2007 4:43 AM by Joel Tamo

    The static method getLogger(class) from the class Logger sho

    Joel Tamo Newbie

      I wrote this part of code but i get a warning:
      The static method getLogger(class) from the class Logger should be accessed in a static way.
      I use java 1.5 and jboss SA 4.0

      What should i do??
      Thanks

      import java.rmi.RemoteException;
      import javax.ejb.EJBException;
      import javax.ejb.SessionBean;
      import javax.ejb.SessionContext;

      import org.apache.log4j.Level;
      import org.apache.log4j.Logger;

      public abstract class MasterSessionBean implements SessionBean {
      //Utilities for Logging
      private static Logger logger;


      public MasterSessionBean() {

      logger = logger.getLogger("org.apache");

      log("SessionMaster()");
      }


      protected void log(String message) {
      logger.log(Level.DEBUG, message);
      }

      protected void warn(String message) {
      logger.log(Level.ERROR, message);
      }
      }