Log4net is the .NET version of log4j. In order to use it you must do the following:
- Reference log4net-net-1.1.dll
- In each class include the following
- using log4net;
private static log4net.ILog s_log = LogManager.GetLogger( System.Reflection.MethodBase. GetCurrentMethod().DeclaringType);
- Goto Project->Add New Item->Application Configuration File. This will create a file called App.Config
- Enter log4net config info into App.Config. Here is a sample file: SampleAppConfig
- In AssemblyInfo.cs add the following to the end of the file:
[assembly: log4net.Config.DOMConfigurator(Watch=true)]
