I spent a lot of time & effort writing a thread-safe logger for our own internal use. If there's sufficient interest I'd be willing to get the ball rolling on getting the contribution approved by our internal IP folks...
____________________________________________________________________________________________ Jeffrey E. (Jeff) Care [EMAIL PROTECTED] IBM WebSphere Application Server WAS Release Engineering From: Stefan Bodewig <[EMAIL PROTECTED]> To: dev@ant.apache.org Date: 07/11/2008 12:03 PM Subject: Logging and synchronization On Fri, 11 Jul 2008, <[EMAIL PROTECTED]> wrote: > XmlLogger could lose messages when parallel is used. Since DOM is not thread safe (something I didn't fully realize) our XMLLogger implementation failed to add a few elements when parallel was used. I've now synchronized all appendChild calls and it seems to work OK. Of course this means XmlLogger will now be synchronized even if you don't use parallel at all - or fork processes which could generate messageLogged events from a separate thread, or do anything else that happens on a separate thread. Do you think it would be worth it if we added a SynchronizedXmlLogger and ask people to use that if they intend to do multithreaded things? Or do we just swallow the performance impact of synchronization? BTW, all the other loggers are vulnerable to this as well. DefaultLogger will happily mix log outputs of several messages - in particular now that trunk no longer serializes the messageLogged events. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]