File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logging parallel threads

 
Dorothy Taylor
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to create a log file in an xml format. I want to know that if there are many parallel threads updating(insert, edit, delete) in this file, can we ensure the integrity of the structure of the xml file? Can we use log4j for this?
 
Paul Clapham
Sheriff
Pie
Posts: 20184
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course. Have the logging done by a single object, which all of the threads use, and have the logging done in a synchronized method.
 
Dorothy Taylor
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer. Is it possible to have a custom structure for this xml log file using log4j?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic