In a .net 5 worker service project, I have configured the log4net. All other appenders working fine except adonetappender.
There is no error which is occurring and if I see the list of appenders in the log manager repositories, ADO net appender is present. still its not logging to the db. I have used below code in the Configure Services method to configure the log4net.
.ConfigureServices((hostContext, services) =>
{
var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
var dirname = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
XmlConfigurator.Configure(new FileInfo(string.Format("{0}{1}", dirname, @"log4net.config")));
});