<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV></BODY></HTML>