Logging what’s happening in your application is something necessary and useful for your debugging sessions. As .NET Core is a fair new technology, you’re going to find a lot of guides on how to configure log4net for a .NET Framework application but it’s far less clearer for a .NET Core one.
In this guide, we’re going to create a new solution with multiple projects that will use our logging object. The goal is to never depend from the log4net package in any project but, instead, to depend on a local solution that will present a
Logger object with static methods to log. Thus, we will only have to add an
using and to call
Logger.Log() to log something.
The simpler, the better, huh? Let’s go!
You’ll be able to download the example solution at the end of this guide! 😊