avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: AsyncLogTarget: Can not write to closed target ...
Date Thu, 13 Dec 2001 13:02:39 GMT
On Wed, 12 Dec 2001 22:58, Bachran, Michael wrote:
> I got a problem with the asnychronous target. It always states it can not
> write to a closed stream. It does not override the processEvent method in
> AbstractTarget and therefore checks the isOpen flag! Does it need to? It
> can be overridden in AsyncLogTarget not to check, but to check if the
> consuming thread is running I patched it locally by setting the flag to
> true at the beginning of the run method of the AsyncLogTarget:

Wierd. Works fine on one of my projects but looking at the code it shouldn't 
work at all. Hmmm. Any I fixed this (actually moved open() into constructor) 
and I also wrapped the delegation of log event in a try-catch block to stop 
it ending the thread. 

Could you make sure these things work for you? I won't be able to test it 
till the weekend but it looks like it should work.



"Sometimes its better to keep your mouth shut and 
let people think your an idiot, than to open it 
and remove all doubt." 

To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message