Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 03 Jun 2017/13:51:32:553 DEBUG connectors.BaseConnector [] [] [] - Request Message is <soapenv:Envelope xmlns:_0="abc" xmlns:_1="abcd" xmlns:soapenv="abcde" xmlns:v1="abcdef"><soapenv:Header><_0:Trace mustUnderstand="false"></_0:Trace><_0:MsgDetl mustUnderstand="false"><_0:MsgUID>20150103135132968917</_0:MsgUID></_0:MsgDetl><_0:ExtendedHeader><CredentialsRqHdr><PartyId>123456789</PartyId><LoginName>Userid</LoginName><PartyAuth><SecTokenKey><SessKey>SessionID</SessKey></SecTokenKey></PartyAuth></CredentialsRqHdr></_0:ExtendedHeader></soapenv:Header><soapenv:Body><v1:actionList><_1:CommonRq><_1:OrgCode>2009</_1:OrgCode></_1:CommonRq><_1:CustId>12345678</_1:CustId><v1:e123><v1:SortOrder>L</v1:SortOrder><v1:SortSeq>D</v1:SortSeq></v1:e123></v1:actionList></soapenv:Body></soapenv:Envelope>
- 03 Jun 2017/13:51:32:553 MsgUID, LoginName, CustId
- sed -Ee '
- s/^/nn/
- s/nn/&n/;s/[[:blank:]]+/n/3;s/(.*)nn(.*)n(.*)n/13nn2/
- s|<_0:MsgUID>|n|;s|</_0:MsgUID>|n|;s/(.*)nn(.*)n(.*)n/1 3nn2/
- s|<LoginName>|n|;s|</LoginName>|n|;s/(.*)nn(.*)n(.*)n/1 3nn2/
- s|<_1:CustId>|n|;s|</_1:CustId>|n|;s/(.*)nn(.*)n(.*)n/1 3nn2/
- s/nn.*//
- ' log.file
- 03 Jun 2017/13:51:32:553 20150103135132968917 Userid 12345678
- perl -lne '$,=$";
- print /^(?:S+s+){2}S+|<(?:_0:MsgUID|LoginName|_1:CustId)>K(?:.*?)(?=<)/g' log.file
- sed 's/(.*:[0-9]* ).*<_0:MsgUID>([^<]*).*/1, 2/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement