I’m working on a rather large ASP.NET MVC based web application. It is getting it’s data from SharePoint using the SharePoint Object Model. I’m in the process of writing all my supporting library code and debugging can be tough.
Being a former developer on the UNIX platform, I longed for a tail application and the goodness of “tail -f logfile.log” to watch my debugging statements fly by. I also longed for a good logging class to add to my application.
Nlog (http://www.nlog-project.org/) – A very easy to implement logging library that will allow you to output many different messages from your system including stack traces, inner stack traces, custom messages, tracing level information and allow you to output this to the console, an email message, a log file or several other formats.
TailForWin32 (http://tailforwin32.sourceforge.net/) – I’m sure there are several types of applications out there that do this, but this was the first one I found and tried. It does just what I need. It keeps the last 64K of a file open in a text window and has several options such as audio notification when the file updates, fonts to view the data, opening multiple files, etc.
Any large application, especially a web application should always have some form of logging not just for debugging your code but to also help find bottlenecks and to make sure your systems are doing what they are suppose to. Get your logging functionality in at the beginning and make it part of your development process. Trying to add it later on will do nothing for you but give you a migraine.