Thanks for the information. Yes, this is a server based application
and not a web application, so I think I am OK. I will take a look at
some other implementations to see what else is different and maybe use
another approach.
On Sun, 20 Mar 2005 23:23:27 -0600, Jacob Kjome <[EMAIL PROTECTED]> wrote:
> At 01:45 PM 3/18/2005 +0000, you wrote:
> >Use the following
> >
> >URL url = this.getClass().getResource("log4j.properties");
> >// Configure the properties and observe the file every 2 seconds
> >PropertyConfigurator.configureAndWatch(url.getPath(), 2000);
> >
>
> Please avoid configureAndWatch. It uses a non-daemon thread and can cause
> issues with shutting down classloaders in containers. I would use a
> dynamic configuration application. If you are using a webapp, try the
> various configuration servlets out there. There is one in the sandbox, and
> enhanced version in the wiki, and others listed on Log4j's download page in
> the 3rd party section. If it is a command line app, then configureAndWatch
> is probably ok.
>
> Jake
>
> >-----Original Message-----
> >From: Elihu Smails [mailto:[EMAIL PROTECTED]
> >Sent: 18 March 2005 13:45
> >To: [email protected]
> >Subject: dynamically reloading log4j config file
> >
> >Is it possible for Log4J to dynamically reload the configuration file?
> > For instance, if I have my configuration set to INFO, and there is a
> >problem in my program and want to increase the logging to DEBUG, could
> >I change the config file to reflect DEBUG and then call
> >PropertyConfigurator.configure( String ) ?
> >
> >Thank you in advance for the help.
> >
> >---------------------------------------------------------------------
> >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]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]