There is a third-party log4net adapter for the ASP.NET Core logging interface.
Only thing you need to do is pass the ILoggerFactory
to your Startup
class, then call
loggerFactory.AddLog4Net();
and have a config in place. So you don't have to write any boiler-plate code.