asp.net-corelog4netasp.net-core-2.2log4net-configurationlog4net-appender

Why doesn't Microsoft.Extensions.Logging.Log4Net.AspNetCore support AdoNetAppender and are there plans for it to?


I am using Microsoft.Extensions.Logging.Log4Net.AspNetCore (AspNetCore 2.2) and I want to use an AdoNetAppender but it seems like the only option is to make my own or use MicroKnights.Log4NetAdoNetAppender.

References: - reference 1 - reference 2 - reference 3 - reference 4


Solution

  • Unfortunately, the Microsoft.Extensions.Logging.Log4Net.AspNetCore is a nuget package that only connects the Microsoft.Extensions.Logging system and the log4net library, but doesn't implement specifically nothing to make the existing log4net appenders compatible with .NET Core applications.

    Maybe you can raise a request to ask for an update for appenders / log4net library at the log4net official issue tracker.