Re: What is the preferred way to parse messages out of a log?



Thanks for the replies. I need to extract the values of the message and
I was hoping to create objects from them and stuff the objects into an
arraylist so I can iterate through them. Eventually the idea is to
build a servlet that will format the messages in a easier to read
format, provide searching and message grouping by the dialogID. I have
played with perl and I feel the use of Java objects is easier for me to
understand than using perl's hashes. Obviously you feel perl is the way
to go, can you provide me a basic example of how you would store the
data in a structure so I can retrieve them later?
William Brogden wrote:
On Sat, 16 Sep 2006 20:43:30 -0500, <paulers69@xxxxxxxxx> wrote:

Hello,

I have a large log file that contains information that I wish to pull
out.. The log entry consists of multiple lines per message Can someone
point me in the right direction to extracting this data? Below is an
example of an entry that I would like to parse the values out of. Your
help is greatly appreciated.

11:44:29 pg100B-pim1 Trace: [ 2516]VRU->PG: Service Control Message (=
Message Type 47); Message Length 713 bytes
New Call (= Subtype 5); DialogueID: (74521) 00012319;
SendSeqNo: (1)00000001
Trunk Group ID: (1) 00000001
Trunk Number: 2
Service ID: (1) 00000001
Dialed Number: JP_TMZ_CARD_FDS
ANI: 5125379013
Called Number: 8889648542
DNIS: 8889648542
Call Variable 1:
Call Variable 2: FDS
Call Variable 3:
Call Variable 4:
Call Variable 5:
Call Variable 6:
Call Variable 7:
Call Variable 8:
Call Variable 9: 5125379013 ,00
Call Variable 10:
ECCVar:3: "dd849f24-270d-11db-469c-00e081022fd9
8889649541
3
"


If you are comfortable with Java tools for XML you might look into
this "pipeline" oriented toolkit:
http://servingxml.sourceforge.net/

The site contains examples of working with various "flat" file formats
and interconverting to and from XML.

Bill

.



Relevant Pages

  • Re: What is the preferred way to parse messages out of a log?
    ... format, provide searching and message grouping by the dialogID. ... in Java 1.5 to selectively extract values. ... > Trunk Group ID: 00000001 ... If you are comfortable with Java tools for XML you might look into ...
    (comp.lang.java.help)
  • Re: What is the preferred way to parse messages out of a log?
    ... format, provide searching and message grouping by the dialogID. ... the program that generated the log file probably has each of the ... Trunk Group ID: 00000001 ... If you are comfortable with Java tools for XML you might look into ...
    (comp.lang.java.help)
  • Re: tt:mm:ss interferes with defined range?
    ... In Column data format select Do not import ... This will extract the unique dates in ascending order. ... You can use this data for you chart. ... Microsoft Excel MVP ...
    (microsoft.public.excel)
  • Re: Exporting DV using Toast
    ... presents, so I extracted the footage from them in DV format using Toast, ... edited them using Final Cut Pro, and mastered and burnt them using iDVD. ... went well until playing the final disc image with DVD player, ... I've used Toast because it seems to be the only thing that will extract DV ...
    (uk.comp.sys.mac)
  • Re: Suggestions for extracting masked selections and generating XML
    ... Then it would be quite simple to extract the data, without even needing to know much about the layout. ... Alternatively, you could take the documents to a document scanning company with the software to create masks to recognise the data fields. ... In each of the format files, the data is in a different ... make a selection and somehow "tag" it as if to say "this area ...
    (microsoft.public.office.misc)