We use log4net and found great flexibility. We also have our own wrapper class, which is used in all of our projects, allowing us to use static methods to write to specific logs. Log4net comes with one DLL and, of course, our dll wrapper. It is easy to extend for additional functionality, now our wrapper class allows us to write to the Windows event logs, if necessary.
There are many examples of how to implement log4net, and provides many ways to write / send log information:
http://logging.apache.org/log4net/release/config-examples.html
An example of the implementation of our wrapper:
Log.Error("Message", this);
Log.Error("Message", Exception, this);
Log.Error("Message", Exception, Type);
Log.Info("Message", this);
Log.Warn("Message", this);
source
share