logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Wen Zhe <zwen...@espatial.com>
Subject RE: why my logger doesn't get executed??
Date Fri, 12 May 2006 08:16:05 GMT
Jake. You're absolutely right. It's working perfectly now.
I was putting log4j.xml in directory /WEB-INF. and cause tomcat server not
packing up it.

Thanks a million!!

Jason
-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com] 
Sent: 11 May 2006 22:34
To: Log4J Users List
Subject: RE: why my logger doesn't get executed??


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 <zwenzhe@espatial.com>:

> 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:HBender@Ergonomics.ch]
> 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:zwenzhe@espatial.com]
> > 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: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message