Re: config file reloading

2003-08-28 Thread Jacob Kjome
I used to use the configureAndWatch() method in my webapps, but I advise against it now. The watchdog classes currently have no lifecycle control. LogManager.shutdown() will *not* end the thread that the watchdog uses. If you try to reload your servlet context, the thread will continue to

Re: config file reloading

2003-08-28 Thread Jacob Kjome
Oh, and I forgot to mention setting the -Dlog4j.configuration system property which you can poll to find where log4j.xml exists. Jake At 06:09 PM 8/27/2003 -0500, you wrote: I used to use the configureAndWatch() method in my webapps, but I advise against it now. The watchdog classes

Re: config file reloading

2003-08-28 Thread Larry Young
Jake, Thanks for the input and warnings! I can't use the -D option when starting tomcat because each webapp (~20 of them) will each have a separate configuration file. And the InitContextListener() will only work for my webapps, but not my standalone apps. So it would seem

Re: config file reloading

2003-08-28 Thread Larry Young
Jake, A quick question about your past use of configureAndWatch() ... I noticed in Ciki's book that when loading a config file, only those parts of the existing configuration which are explicitly mentioned in the new config file are affected. That makes sense if you are

Re: config file reloading

2003-08-28 Thread Jacob Kjome
Unfortunately, I don't have much to say here. I only ever added loggers. A better approach is to use a runtime logger configurator. There is one in the sandbox, but that only works on existing loggers. There are other runtime configurators out there that can add/remove loggers and

Re: config file reloading

2003-08-28 Thread Ceki Gülcü
Two short comments. 1) My name is Ceki not Ciki. 2) You can use LogManager.resetConfiguration() to reset or clear the existing config before you read the new config file. HTH, At 08:58 AM 8/28/2003 -0700, Larry Young wrote: Jake, A quick question about your past use of

Re: config file reloading

2003-08-28 Thread Jacob Kjome
At 06:16 PM 8/28/2003 +0200, you wrote: Two short comments. 1) My name is Ceki not Ciki. Sorry Ceki, typo. 2) You can use LogManager.resetConfiguration() to reset or clear the existing config before you read the new config file. Ah, yes. Never bothered with that since the configuration I do

Re: config file reloading

2003-08-28 Thread Larry Young
Ceki, At 06:16 PM 8/28/03 +0200, you wrote: Two short comments. 1) My name is Ceki not Ciki. apologies ... mea culpa!! 2) You can use LogManager.resetConfiguration() to reset or clear the existing config before you read the new config file. I think that is exactly what I was

config file reloading

2003-08-27 Thread Larry Young
Hello, I was planning on using the FileWatchdog class (via DOMConfigurator) to cause my log4j.xml file to be reloaded whenever it is changed, avoiding having to bounce the webapp during debug. My problem is that I rely on the default initialization mechanism in log4j to find the