• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logging parallel threads

 
Dorothy Taylor
Ranch Hand
Posts: 104
  • 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: 20748
30
Eclipse IDE Firefox Browser MySQL Database
  • 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
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic