What exactly do you expect that to do? Put log4j.jar in WEB-INF/lib and log4j.xml in WEB-INF/classes and Log4j will auto-configure itself (assuming you are using a server like Tomcat where it uses child-first classloading behavior).
Jake Quoting Zheng Wen Zhe <[EMAIL PROTECTED]>: > I put the followings in the web.xml. I use struts framework, and didn't > touch the strut-config.xml. > > <init-param> > <param-name>log</param-name> > <param-value>/WEB-INF/log4j.xml</param-value> > </init-param> > > > -----Original Message----- > From: Bender Heri [mailto:[EMAIL PROTECTED] > Sent: 11 May 2006 16:40 > To: Log4J Users List > Subject: RE: why my logger doesn't get executed?? > > How does your config file look? > Heri > > > -----Original Message----- > > From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] > > Sent: Thursday, May 11, 2006 5:16 PM > > To: 'Log4J Users List' > > Subject: 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"); > > > > } > > > > } > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
