Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: Logging Question Date: Sun, 01 Jan 2012 18:24:53 -0500 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: <9102298.933.1325372035497.JavaMail.geo-discussion-forums@prj1> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 1 Jan 2012 23:18:59 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="qwFw1g9RsQ6TkML5yezG9A"; logging-data="4579"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/N5dLdwCQYIH8JBf5+s93VVlBBEVDTBd4=" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20111110 Icedove/3.0.11 In-Reply-To: Cancel-Lock: sha1:wi7zQVBxTlmEWnelqigQ+BDk9NY= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11055 On 01/01/2012 06:06 PM, Arved Sandstrom wrote: > On 12-01-01 08:59 AM, Jeff Higgins wrote: >> On 01/01/2012 06:33 AM, Stefan Ram wrote: >>> Novice writes: >>>> Yes! I simply copied XMLFormatter from the Java source file, added one >>> >>> A log file should remain usable even when the process was terminated >>> abnormally. But an XML file needs to have one single root element >>> that has an end tag at its end. A process that is being terminated >>> abnormally might not write such an end tag. So, one has no guarantee >>> that the log output is well-formed XML. Or did I miss something? >>> >> Only that there are no guarantees. >> >> > And let's face it, the document element in this case is useless. > It conveys zero information. It would better to regard each record as a > separate well-formed XML document, and the file is merely physical > storage for a bunch of log records. > > This kind of XML "wrapper" element, as in in this case, happens > when folks think that 1 XML document == 1 physical file. An XML document > entity is a logical, not a physical storage, concept. > Rodger. That brings up the interesting possibility of an Berkeley DB (XML) Logger.