I was wondering how to read the IIS log files to check what's going on with my web pages (both this blog and company website) in an easy and flexible way. Sure, there are plenty of commercial and non-commercial applications that do wonders. I have to admit that I ruled out commercial apps because I don't have a big need for this, just to check statistics sometimes. I didn't like free ones either because they are too complex or to restricted. The time passed by and one day I read about LogParser. It is a free application (downloadable from Microsoft web site) that reads various log files and let you do the sql queries on them (it has other features, too). It comes in two formats: command line tool and COM object. After a day of using it I have to say that it is an excellent tool if you are in the mood looking at your log files.
Here is an example on how to check your blog rss feed hits per month:
logparser "select TO_STRING(date, 'yyyy-MM') as Month, count(*) As Hits from <communityserver> where cs-uri-stem='/blogs/blog_with_righthand/rss.aspx' group by TO_STRING(date, 'yyyy-MM') order by TO_STRING(date, 'yyyy-MM') desc"
Elements processed: 66202
Elements output: 3
Execution time: 0.52 seconds