Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 08 Mar 2012 19:17:10 -0600 Date: Thu, 08 Mar 2012 17:17:10 -0800 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Logging problem References: <4f590d2a$0$295$14726298@news.sunsite.dk> <4f595349$0$282$14726298@news.sunsite.dk> In-Reply-To: <4f595349$0$282$14726298@news.sunsite.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 34 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.230.206.198 X-Trace: sv3-tzKrSg7SB1yaf7spV20veCCRcHul1XBs98ISWvKJxk8UWFP25xKz0LJmYOX2ZcNAV67INja9Iuy91G6!UfsKzWA7gGa8JiQlqqrOueSPrILOq0lt5wKMbHMgFRplM23JluXeOhpYgh+lwk6kjs18DotxVDQf!iG/d+8VARXoOldmNQQqmu/6nxPB2nuYaphE/EVEZU9EEtgY= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2748 Xref: csiph.com comp.lang.java.programmer:12790 On 3/8/2012 4:48 PM, Arne Vajhøj wrote: > On 3/8/2012 6:20 PM, markspace wrote: >> On 3/8/2012 2:53 PM, Patricia Shanahan wrote: >>> Novice wrote: >>> ... >>>> I strongly prefer the XML logs because I've got an XSL that formats >>>> the XML log for my purposes and makes the log very easy to read. It's >>>> worked fine for weeks now - and still does when the last tag is >>>> in the file - so I just want to figure out what foolish thing I've >>>> done to keep the getTail() method from working. >>> >>> If you stay with this line, I recommend writing a recovery program that >>> can build a valid XML file from an arbitrarily truncated log, not just >>> the missing end. >> >> >> This is a good idea and I was going to suggest it in my post as well, >> then I decided to hear back from the OP first. >> >> I wonder if a relatively primitive parser like SAX could be used for >> this? It might be immune enough to parsing errors to allow arbitrary >> unclosed tags to be detected and then added to a file. > > I would not rely on an assumption about exactly when a SAX parser > would barf on invalid XML. That is the sort of reason why I feel the truncated log issue should be examined now, rather than waiting until it happens. Maybe the log is sufficiently readable and searchable even in the XML form that Novice could use it anyway? Patricia