3

I have an asp.net web application backed by SQL Server 2005, and I want to log a lot of application layer things like

  1. Account creations
  2. Account permission changes
  3. Password changes/resets
  4. Certain application actions taken by a user (e.g. modified some setting in the application)

Logging these things will probably end up being about 200mb-1gb per day of data and growing (spread across multiple servers).

How would I go about adding this type of logging functionality into my application?

Davis Dimitriov
  • 4,159
  • 3
  • 31
  • 45
  • 1
    there are several Logging farmeworks, NLog, Log4Net, MS Enterprise Libraries... in general you log in the code and in the configuration you decide and switch the log destination like event log, database, text file, stream, email... for such high volumes like you mentioned I would not flood event log and database but only text files, but it depends if you want to query those logs with SQL queries in the future or not... – Davide Piras Dec 08 '11 at 17:48
  • Hi @Davis Dimitriov What do you envisage your typical usage of the logs? Are the logs "just incase" i.e. they won't be looked at very often, but in case something breaks then having the history would be useful OR will you need to filter the logs etc often to find specific information OR on the other extreme do you envisage needing to report on them / perform analytics. Or maybe even; would your user base need to look at the logs e.g. administrators (or is it just for developers)? – Alex KeySmith Dec 08 '11 at 17:54
  • @Alex Key the main usage is a "just in case" log. Reporting will happen in bulk on occasion – Davis Dimitriov Dec 08 '11 at 19:26

3 Answers3

1

I came across a web service called "PaperTrail" the other day, it's a managed / hosted logger.

https://plus.google.com/114380944985532634845/posts/8dH2vAQ5JRV

Having a quick look over the tour, there a free version to get you started and then they do prices per how much you want to store per month. At the time of writing, it's pretty cheap at $7 a month.

https://papertrailapp.com/

n.b. I don't work for papertrail, nor have I actually used it yet, but it looks pretty cool and might suit your needs of storing lots of data.

Alex KeySmith
  • 16,657
  • 11
  • 74
  • 152
0

TraceListner can be used to log your activities. Check this link http://msdn.microsoft.com/en-us/library/sk36c28t.aspx

Nps
  • 1,638
  • 4
  • 20
  • 40
0

You can log this information with log4net as info. Using RollingFileAppender you will be able to limit the log size. Check this question for more information.

Community
  • 1
  • 1
thiagoleite
  • 503
  • 1
  • 3
  • 11