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
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
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
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
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
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
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
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
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