On Tue, May 20, 2008 at 2:03 AM, Robert Greig <[EMAIL PROTECTED]>
wrote:

> 2008/5/19 Senaka Fernando <[EMAIL PROTECTED]>:
>
> > This is my thought on continuing the polling mechanism. When we read the
> > log4j.xml at startup, if this issue is likely to crop-up we should
> initiate
> > a controlled shutdown after logging the warning.
>
> Yes, this is the straightforward case - if someone has a bad file on
> startup just log it and die.
>
> >  If, this happens during
> > operation the warning must be logged once, and we will continue with the
> > previous known values.
>
> OK. The question is whether you can do this without modifying log4j?


We can continue with previous known values without modifying log4j. For
instance if we started the broker without setting up the log watcher, we can
do whatever change we like to log4j.xml, and it wont affect the operations.


>
>
> > If the error is corrected, this property that withheld the
> > warning will be reset and, a debug message will be logged explaining that
> > the problem was corrected.
>
> Do you meant that you will try to detect which particular property is
> invalid? In general, is that not impossible?


I believe you did not quite understand what I said. Now, if we continue to
poll, the exception will be repeatedly thrown. And, this will lead to
repeatedly printing the same fatal warning. We can stop the printing of the
warning using a property (a variable referred through a getMethod). Then, if
someone corrects the mistake, there wont be any exception thrown and we can
continue normal operation. Then we will reset the property that stopped the
printing of the warning message and log a debug message that the error was
corrected. I hope I made myself clear.

Regards,
Senaka


>
>
> RG
>

Reply via email to