Hi...

I have used this tool.

SmartInspect – the logging tool developed by my company Gurock Software.


Example-

C#
using System; using Gurock.SmartInspect;  public class EntryPoint {    public static void Main(string[] args)    {       SiAuto.Si.Connections = @"file(filename=c:\log.sil)";       SiAuto.Si.Enabled = true;        SiAuto.Main.LogMessage("This is a message!");       SiAuto.Main.LogError("This is an error!");        SiAuto.Main.LogValue("MyInt", 5);       SiAuto.Main.LogSql("GetAllCustomers",            "SELECT * FROM customers");       SiAuto.Main.LogObject("Main", SiAuto.Main);        SiAuto.Main.Watch("MyWatch", 2);       SiAuto.Main.Watch("MyWatch", 7);    } }
--------------
You can find other tools details on -

http://www.dotnetlogging.com/

Hope this helps