This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

logging parallel threads  RSS feed

 
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
Posts: 22374
42
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
Boost this thread!