You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Zheng Wen Zhe <zw...@espatial.com> on 2006/05/11 17:15:32 UTC

why my logger doesn't get executed??

Hi all,

This is my A Java class with logger resides.

My question is why those loggers don't execute when this class is called?

 

Cheers,

Jason

************************************

import org.apache.log4j.Logger;

......

public class LoginAction extends Action {

      static Logger logger = Logger.getLogger(LoginAction.class);

 

      public ActionForward execute(

            ActionMapping mapping,

            ActionForm form,

            HttpServletRequest request,

            HttpServletResponse response) {

            LoginForm loginForm = (LoginForm) form;

            // TODO Auto-generated method stub

 

            logger.debug("Here is some DEBUG");

            logger.info("Here is some INFO");

            logger.warn("Here is some WARN");

            logger.error("Here is some ERROR");

            logger.fatal("Here is some FATAL");

 

            return mapping.findForward("success");

      }

}