I'm looking at switching to a new unified logging solution for use in our new line of products and I wanted to see what some of the people on Stack Overflow thought. We will need logging for a variety of applicatons: ASP .net, windows services, web services, wpf apps etc. We are a windows shop only.
Some of our requirements for a logging solution include:
1) Log file management
- Ability to split files up over a certain size
- Ability to auto archive/delete after certain period of time
2) Ability to send emails on certain types of messages logged (errors for example)
3) Ability to write messages to the windows event log
- We need to be able to specify where it's being written in the event log.
It would also be nice if it would automatically create the event log source if it does exist.
I've started looking at nLog, windows trace and log4net. I'm not limited to these 3 only it's just a few that came up a lot when searching.
You can create your own logging lib... I did.
Take a look at PostSharp http://www.sharpcrafters.com/ they have very good examples of some basic logging systems.