[jdom-interest] Generating log in XML format with JDOM

Waqas Shafiq wshafiq at yahoo.com
Sat Jun 3 22:32:22 PDT 2000


We are using JDOM to generate a log in XML format. Our application generates multiple events every few seconds that must be logged. The application may run from a few hours to several days. The XML formatted log must be stored in Lotus Notes database.

We are building a Document and than we output this document to a file using XMLOutputter. The XML file is than inserted in the database. As you might have guessed this invloves a lot of disk I/O since the log file must be updated every few seconds. Also the entire file must also be inserted into the databse as an EmbededObject every few seconds. 
 
If we were generating a log file in text format than we would have just appended few lines to the end of log directly in the database when ever an event occured. 

We have thought about updating the log after specified intervals of time but this is not acceptable because if the application crashes during execution the log file will not reflect the state of the application at the time it crashed.

It is quite ridiculous to write the entire file to disk and than update it in the datasbase to reflect new changes to the log. I am new to XML and I would appreciate it if any one could suggest a better way to generate a log file in XML.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20000604/ace8bc9f/attachment.htm


More information about the jdom-interest mailing list