Csharp Log4net Min Usage

Log4Net Minimal Usage Log4net - minimal info to start. Step 1 Create a project using Visual Studio (the code is in c#). Step 2 Apache log4net Log4Net Install - version at the time of writing log4net 1.2.13 Download Page Direct download link to the root folder For Framework 4 use log4net.dll and log4net.xml from log4net-1.2.13-bin-newkey.zip\log4net-1.2.13\bin\net\4.0\release\ - Your version might be different Step 3 Create folder lib under the project and place files there. Add reference to lib\log4net.dll Step 4 In the root of the project folder create XML file: log4net.config In Properties for the file set: Copy to Output Directory: Copy if newer Populate file with following log file appender will create a file in logs folder with the file name of output.log; once file size reaches 10MB, new file will be created Maximum of 10 log files will beretained Sample of log4net.config ...

January 14, 2015 · 2 min