Re: What is the preferred way to parse messages out of a log?
- From: SuperGh0d@xxxxxxxxx
- Date: 17 Sep 2006 14:54:41 -0700
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
.
- Follow-Ups:
- Re: What is the preferred way to parse messages out of a log?
- From: Rhino
- Re: What is the preferred way to parse messages out of a log?
- From: William Brogden
- Re: What is the preferred way to parse messages out of a log?
- References:
- What is the preferred way to parse messages out of a log?
- From: paulers69
- Re: What is the preferred way to parse messages out of a log?
- From: William Brogden
- What is the preferred way to parse messages out of a log?
- Prev by Date: Re: Optional Parameters?
- Next by Date: Re: Regular expression does not return all matches?
- Previous by thread: Re: What is the preferred way to parse messages out of a log?
- Next by thread: Re: What is the preferred way to parse messages out of a log?
- Index(es):
Relevant Pages
|