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 Thu, 11 May 2006 15:35:04 GMT
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


Mime
View raw message