Background: This is a .netcore 3.1 web api. It references a DLL that references an SDK to create connections to a third party application. When creating the server object (in the DLL) it throws the following error:
.net core app
- DLL containing legacy methods
- DLL instantiates an SDK server object throwing log4net error
I've added the Microsoft.Extensions.Logging.Log4Net.AspNetCore nuget package and tried the logger factory way:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddLog4Net();
I've also tried this: https://stackify.com/making-log4net-net-core-work/
I have a log4net.config in the solution as well. Any advice on how to resolve the error?

