I am trying to use log4Net in an ASP.NET Core 3.1 application and I am trying to get it to work with Dependency Injection using controllers. I am successfully able to use Log4Net using LogManager.GetLogger(type). Any help would be appreciated.
Here is a sample of the code I am using for logging now:
public class HomeController : Controller
{
private static readonly log4net.ILog _log = LogManager.GetLogger(typeof(Logger));
public HomeController()
{
_log.Debug("Test");
}
}