In my code, I have a method (doLogSetUp) that, among other things, calls the
configureAndWatch method.  The doLogSetUp method is called every time a
logging occurs.  That means if I need to log 10 times in my application, the
doLogSetUp method is called 10 times, hence the configureAndWatch method is
called 10 times.  Are you saying that I would have 10 different threads all
watching my config file?  I thought that if I was using the same object each
of the 10 times to call the doLogSetUp method (which calls the
configureAndWatch method)that it would use the same thread (the thread that
was created the first time), rather than create a new one.

Perhaps my approach is incorrect?  It sounds like I should only call the
configureAndWatch method once, say upon a successful user log-in....? 

-----Original Message-----
From: Mark Womack [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 1:09 PM
To: 'Log4J Users List'
Subject: RE: Turning of conf file watching


You can look at the code, but in the current version, there is no mechanism
to stop a Watchdog after it is created and started.  In fact, each time you
call configureAndWatch(), it creates a new instance of a Watchdog.  So, you
can potentially have multiple Watchdogs watching the same file and stepping
over each other.  Unless I am missed something in the code.

I am working on a some proposed code that will enhance the Watchdog
implementation so that you can have better control over this.  The new
design also does not require a configureAndWatch() method in the
configurator class; it will potentially work with any configurator.  There
are also more Watchdog types, like one that watches an http url on a web
server.  I submitted an initial version to the dev list, and I am working on
updating it to incorporate the first round of feedback.

If you are interested in looking at it, contact me directly.  I would
appreciate the feedback.

-Mark

-----Original Message-----
From: Charlie Cano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 10:13 AM
To: [EMAIL PROTECTED]
Subject: Turning of conf file watching


Hey all,

Quick question: If I initialize a PropertyConfigurator with 

PropertyConfigurator.configureAndWatch("myConfFile", 1000);

is there anyway I can turn that watch off?  The API doc is not clear on this
issue.  I basically want the ability to, at some future point,
programmatically stop checking the configuration file and auto-loading the
configuration.  Is this possible?

Thanks in advance,
Charlie

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

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

Reply via email to