Previous Next

Thread: Some help in parsing a really difficult log !

Last post 03-27-2008 10:32 AM by lizardlabs. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 03-12-2008, 1:54 AM

    • fzaynoun
    • Not Ranked
    • Joined on 09-18-2007, 3:30 AM
    • Posts 7
    • fzaynoun

    Some help in parsing a really difficult log !

    I was going to use Regex and complicate my life, when somehow i found out about this great tool, what i read until now is that this tool may help me in my task.

    my log file is mainly a csv, but it has a special form, (field_i is a something that i need to extract), in general it look like this: (bold is what is in my file, other is commentary)


     2007-03-11 11:22:45, field1, field2, field3, field4 -- field5 -- field6, sender=field7; smsmsgid=field8; someting=field9 --> Here field 5 has the value "ok"

     2007-03-11 11:22:45, field1, field2, field3, field4 -- field5 -- field6, Error description: Fields7 -->Here field5 has the value Error, and field7, field8, ... don't exist in the log, instead there is only the description of the error

    So what  it is mainly a csv, however, it has date and time, some fields separated by ; instead of , and field5 indicate if this line in log is an error logging or some other useful information.

    Can i use LogParser in parsing this complicated log? I'm newby and i just got the documentation, i like to know from experts here if it possible to do it, and how much hard, a kick in the right direction is appreciated !

    Should i implement the input format, or can i use the already available csv somehow, if i should implement it, i program in C#, is it easy to do it in that language, more than this is it more efficient to do it in C++?

  • 03-27-2008, 10:32 AM In reply to

    • lizardlabs
    • Top 500 Contributor
    • Joined on 12-05-2007, 6:53 AM
    • Posts 13
    • lizardlabs

    Re: Some help in parsing a really difficult log !

    Hi,

    Try using this tool http://forums.iis.net/t/1147180.aspx (Log Parser Lizard). It integrates RegEx plugin for parsing text files.

Page 1 of 1 (2 items)
Page view counter