Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #12792

Re: Logging problem

Date 2012-03-08 20:55 -0500
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: Logging problem
References (2 earlier) <XnsA010999FC386Fjpnasty@94.75.214.39> <HKKdnVvBv8DBpcTSnZ2dnUVZ_v2dnZ2d@earthlink.com> <jjberb$1qt$1@dont-email.me> <4f595349$0$282$14726298@news.sunsite.dk> <cs2dnRG-Ao6Kx8TSnZ2dnUVZ_jadnZ2d@earthlink.com>
Message-ID <4f5962fd$0$284$14726298@news.sunsite.dk> (permalink)
Organization SunSITE.dk - Supporting Open source

Show all headers | View raw


On 3/8/2012 8:17 PM, Patricia Shanahan wrote:
> 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 </log> 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?

I think he said that he wanted to process it with XSLT.

XSLT will not work with an invalid XML file.

But it should be trivial to add that end tag to the file.

It should even be doable with command shell.

Arne

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Logging problem Novice <novice@example..com> - 2012-03-08 19:38 +0000
  Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 14:48 -0500
    Re: Logging problem Novice <novice@example..com> - 2012-03-08 20:06 +0000
      Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 15:38 -0500
        Re: Logging problem Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-08 22:02 +0000
      Re: Logging problem Patricia Shanahan <pats@acm.org> - 2012-03-08 14:53 -0800
        Re: Logging problem markspace <-@.> - 2012-03-08 15:20 -0800
          Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 19:48 -0500
            Re: Logging problem Patricia Shanahan <pats@acm.org> - 2012-03-08 17:17 -0800
              Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 20:55 -0500
                Re: Logging problem markspace <-@.> - 2012-03-08 18:01 -0800
                Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 21:19 -0500
      Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 20:56 -0500
  Re: Logging problem markspace <-@.> - 2012-03-08 14:18 -0800
    Re: Logging problem Novice <novice@example..com> - 2012-03-09 01:53 +0000
      Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 20:59 -0500
      Re: Logging problem Novice <novice@example..com> - 2012-03-09 05:36 +0000
        Re: Logging problem Patricia Shanahan <pats@acm.org> - 2012-03-09 06:27 -0800
        Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 12:31 -0500
          Re: Logging problem Novice <novice@example..com> - 2012-03-09 18:57 +0000
            Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 14:26 -0500
        Re: Logging problem Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-09 15:59 -0400
          Re: Logging problem Novice <novice@example..com> - 2012-03-09 21:32 +0000
            Re: Logging problem Lew <lewbloch@gmail.com> - 2012-03-09 13:56 -0800
              Re: Logging problem Novice <novice@example..com> - 2012-03-09 22:57 +0000
                Re: Logging problem Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-10 14:51 +0000
                Re: Logging problem Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-10 13:00 -0400
                Re: Logging problem Lew <noone@lewscanon.com> - 2012-03-10 10:04 -0800
                Re: Logging problem Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-10 20:23 +0000
                Re: Logging problem Lew <noone@lewscanon.com> - 2012-03-10 07:56 -0800
                Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-10 12:05 -0500
                Re: Logging problem Lew <noone@lewscanon.com> - 2012-03-10 10:10 -0800
                Re: Logging problem Arne Vajhøj <arne@vajhoej.dk> - 2012-03-12 16:13 -0400
                Re: Logging problem Novice <novice@example..com> - 2012-03-10 20:10 +0000
            Re: Logging problem Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-09 19:15 -0400
              Re: Logging problem Novice <novice@example..com> - 2012-03-10 01:59 +0000

csiph-web