Hi,
Sorry if this is the wrong place to post this, but I didn't see a better forum. Our application uses the Java logging system using the XMLFormatter. The application is a server and we have a need for a remote user to examine the logs. The problem is that Java Logging doesn't properly terminate the current log file. When I try to parse the XML log that is currently being written to I get a SAXParseException because the log has the following:
<?xml version="1.0" encoding="windows-1252" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
<date>2012-05-11T12:50:50</date>
<millis>1336755050724</millis>
<sequence>0</sequence>
<logger>foo.test.LogXMLReadFile</logger>
<level>SEVERE</level>
<class>foo.test.LogXMLReadFile</class>
<method>doTest</method>
<thread>1</thread>
<message>This is the first</message>
</record>
Notice the '</log>' is not there. Java logging adds this once the log file is closed but I need to be able to read it while it is still open.
Thoughts?
Thanks
Edited by: JimM on May 11, 2012 10:13 AM - fixed XML layout