On an ASP.NET MVC website, what's the best way to implement access logging? I want to answer the following questions:
- What are the most popular pages?
- Which pages were accessed in the last 24 hours?
- etc.
I could log in to the server using Remote Desktop and poke through the IIS logs myself (even using Microsoft Logfile Parser), but I'd like to be able to run reports from the admin pages of my site.
What's the best way to do this? Should I:
- Add tracing to all of my controller methods?
- Add an IHttpFilter (or whatever) and have that do the logging?
- Configure IIS (IIS7 on Windows 2008) to log to a table in my database, and then define an NHibernate mapping for this table?
- Something else?