LogParser to Retrieve Value in IIS Log

379 Views Asked by At

I want to retrieve the value of api URL in IIS Log file. Because the parameter is a comma delimited string, so I am not able to use Log Parser studio. I created a asp.net console app and tried to retrieve the value so I can manipulate the string. My cs-uri-query format is like this: " checkedItems=A,B&subject=AA". My query below works to retrieve subject but now checkedItems:

strSQL = @"SELECT TOP 5 EXTRACT_VALUE(cs-uri-query,'subject') as Query_subject, COUNT(*) AS Total FROM C:\temp\LOG\u_ex201007_x.log where cs-uri-stem like '/api/path/get' GROUP BY Query_subject ORDER BY Total DESC";

How to get the checkedItems value A,B in strSQL? Thanks.

0

There are 0 best solutions below