Ok, here is a part of my initServlet for Tomcat:

public class InitServlet extends HttpServlet {

    public void init() {
        PropertyConfigurator.configureAndWatch(<your init file>,
                60000);  // this is for 60 seconds!
    }

Regards,
Thomas

> Thanks, I tried that but didn't work.
>
> Can you give me exact details about the same? I tried the
> default delay
> option of 60 secods.
>
> Regards,
> Sumit Mishra
> [EMAIL PROTECTED]
> http://www.cash-tech.com/
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 1:32 PM
> To: 'Log4J Users List'
> Subject: AW: Logging On/Off
>
> Maybe PropertyConfigurator.configureAndWatch helps you.
> http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/Prop
> ertyConfigurat
> or.html
>
> Regards,
> Thomas
>
> > I am using log4j with IBM websphere 3.5.4. Every time we have
> > to switch off
> > the logging, we comment the following line in log4j.prp file.
> >
> > log4j.rootCategory=debug, stdout, R
> >
> > Every time we have to switch on the logging, we uncomment the
> > above line.
> > We read the log4j.prp file in a stateless session bean which
> > is invoked in
> > the init of a startup Servlet.
> >
> > Problem we are facing is that every time we have to switch
> > off the logging,
> > we need to comment the above line in log4j.prp file and
> > restart the app
> > server again for the change to take effect. This is really
> > painful because
> > there are many users connected to the server at any point of time.
> > Can you guys suggest any better way??
> >
> > Regards,
> > Sumit Mishra
> >  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> >  <http://www.cash-tech.com/> http://www.cash-tech.com/
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



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

Reply via email to