Hi!

I have integrated log4j with struts1.1.

I am able to see the prints also.
If I make changes to the log4j.properties file, I have to ensure that the changes take effect .
I do not know how to do this step.
Please help.


The following is my class in which I put the prints.


// Import log4j classes. import org.apache.log4j.*;

public class LoginAction extends Action
{
    static Logger logger = Logger.getLogger(LoginAction.class);

PropertyConfigurator propConfigurator = new PropertyConfigurator();

public ActionForward perform (ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse res)
{
//System.out.println("in LoginAction!!!!!!!!");
//need to log the above line using log4j


        if(logger.isEnabledFor(Level.DEBUG))
            {
                System.out.println(" in 1");
                logger.debug("One !!!");
            }

        DynaValidatorForm rf = (DynaValidatorForm) form;
        String username = (String)(rf.get("username"));
        String password = (String)(rf.get("password"));
        logger.debug("debug   ............ 0");
        logger.info("info   ............1");
        logger.warn("warn   ............2");
        logger.error("error   ..........3");
        logger.fatal("fatal   ............4");

    return mapping.findForward("failure");
            }

}


Thanks, Richie

"To achieve all that is possible, one must attempt the impossible"



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to