tags:

views:

34

answers:

2

I want to log some information about my visitors. Is it better to use the IIS generated log or to create my own in an SQL 2008 db.

I know I should probably provide more information about my specific scenario, but I'd like just generally, pros and cons of either proposal.

A: 

It all depends on what information you want to analyse.

If you're doing aggregations and rollups then you'd want to pull this data into a database for analysis. Pulling your data into a database will give you access to indexes and better querying tools.

If you're doing infrequent one-off simple queries then LogParser might be sufficient for your needs. However you'll be constantly scanning unindexed flat files looking for data which is I/O intensive.

But as you say, without knowing more about your specific scenario it's hard to say what would be best.

Kev
Its good enough to know that IIS stores stuff in flat files. I'd like to be able to query data, sooo custom logging to a DB it is.
Shawn
A: 

You can add additional information to the IIS logs from ASP.NET using HttpResponse.AppendToLog, additionally you could use the Advanced Logging Module to create your own logs with custom filters and custom data including data from Performance Counters, and more, see: http://www.iis.net/download/AdvancedLogging

CarlosAg