Time for action – Adding logging to our application
In this little exercise, we will create a sample application and configure it to use Log4Net as a logging framework and then create some basic logging messages.
- Open Visual Studio and create a new project. Select Console Application as the project template and call the project LoggingSample.
- Add a reference to the
log4net.dll assembly, located in the
lib folder of the project.
- In the Solution Explorer, right-click on the LoggingSample project and select Properties.
- In the project properties window, select the Application tab and set the Target framework to .NET Framework 4.
- In the Solution Explorer ...