On May 11, 2007, at 2:11 PM, Eric B. wrote:
Hi,
I'm trying to use Log4j 1.3alpha-8 watchdog for my XML
configuration file,
but am having difficulties.
I've tried the following:
FileWatchdog confiFileWatchdog = new FileWatchdog();
configFileWatchdog.setFile( log4j.xml path );
configFileWatchdog.activateOptions();
But I get the following error message:
ERROR org.apache.log4j.watchdog.FileWatchdog - watchdog requires
repository
that supports LoggerRepositoryEx
I'm not entirely sure how to create my loggers such that the
repository
supports LoggerRepositoryEx. Is there something special I need to
do in the
log4j.xml file to accomplish this? Are the watchdogs not yet
supported?
The problem isn't that your repository doesn't support
LoggerRepositoryEx. The problem is that it is not attached to a
repository at all. log4j 1.3 introduced the Component interface and
one of the essential steps of a component initialization is calling
Component.setLoggerRepository() to connect the component to a
LoggerRepository.
If watchdogs are not yet fully supported, how can I programatically
reload
my log4j.xml configuration file?
Kamal Ahmed suggested using the DOMConfigurator.configureAndWatch
method in his message. I would suggest using that as we are in the
process of abandoning log4j 1.3 and configureAndWatch is supported in
1.2 and is likely to be supported in log4j 2.0's compatibility
layer. FileWatchdog seems to be only an implementation detail on
log4j 1.3's implementation of configureAndWatch and is unlikely to be
supported in log4j 2.0's compatibility layer.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]