« Previous Next »

Thread: Custom input format with field info on first line of log file

Last post 06-06-2007 4:11 AM by LogParser User : lvth. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 01-31-2007, 9:01 AM

    Custom input format with field info on first line of log file

    Hey,

    I'm quite new on LogParser, but what I saw until now it's very interesting.

    Now I have a question, after searching this forum without answers...

    I'm trying to parse a log file that has a few lines (4) as header, each starting with '#', the 4th contains a list of columns, in the form:

    #NetWork=0
    #SubNetWork=0
    #ChargedPartyNode=1
    #TicketVersion,1,7,L,CalledNumber,8,37,L,ChargedNumber,38,67,L,ChargedUserName,68,97,L,ChargedCostCenter,98,127,L,ChargedCompany,128,143,L,ChargedPartyNode,144,153,L,SubAddress,154,173,L,CallingNumber,174,203,L,CallType,204,206,R,CostType,207,209,R,EndDateTime,210,226,N,ChargeUnits,227,231,R,CostInfo,232,261,R,Duration,262,271,R,TrunkIdentity,272,276,R,TrunkGroupIdentity,277,286,R,TrunkNode,287,296,R,PersonalOrBusiness,297,299,R,AccessCode,300,329,L,SpecificChargeInfo,330,336,L,BearerCapability,337,339,R,HighLevelComp,340,342,R,DataVolume,343,352,R,UserToUserVolume,353,357,R,ExternFacilities,358,397,N,InternFacilities,398,437,N,CallReference,438,447,R,SegmentsRate1,448,457,R,SegmentsRate2,458,467,R,SegmentsRate3,468,477,R,ComType,478,480,R,X25IncomingFlowRate,481,482,R,X25OutgoingFlowRate,483,484,R,Carrier,485,489,R,InitialDialledNumber,490,519,L,WaitingDuration,520,524,R,EffectiveCallDuration,525,534,R,RedirectedCallIndicator,535,537,R,StartDateTime,538,554,N,ActingExtensionNumberNode,555,584,L,CalledNumberNode,585,589,R,CallingNumberNode,590,594,R,InitialDialledNumberNode,595,599,R,ActingExtensionNumber,600,629,R,TransitTrunkGroupIdentity,630,634,R,TicketOrigin,635,637,L,NodeTimeOffset,638,642,R,FirstCarrierCost,643,672,R,FirstCarrierCostT,673,702,R,SecondCarrierCost,703,732,R,SecondCarrierCostT,733,762,R,FacilityCost,763,792,R,FacilityCostT,793,822,R,FacturedCost,823,852,R,FacturedCostT,853,882,R,FirstCarrierName,883,952,L,FirstCCN,1103,1152,L,SecondCarrierName,1303,1372,L,SecondCCN,1523,1572,L

     the list of columns contains, for each column: name, start position, end position, alignment (L/R...)

    after those 4 lines the data are in fixed width lines (no delimiter between fields) an only LF at end of line.

    Can I find somewhere a way to parse this log? Has anyone already built some kind of 'custom' way to do it? Or should I try to understand in deep how to write a 'Custom Plug-in'?

    Thanks in advance

    Luigi

  • 06-05-2007, 8:02 PM In reply to

    RE: Custom input format with field info on first line of log file

    I believe you should be able to use the -nSkiplines: switch to skip the header lines in your log file.
  • 06-06-2007, 4:11 AM In reply to

    RE: Custom input format with field info on first line of log file

    Thanks Glassdrum, but my problem was not how to skip header lines. I'm looking for a way to tell logparser how to decode the fields on the other lines based on the column info on the line 4 (last header).

    Luigi

Page 1 of 1 (3 items)
Microsoft Communities