For me I had to move Logger to a Nuget Package. Below code need to be added in NuGet package project.
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
See https://gurunadhduvvuru.wordpress.com/2020/04/30/log4net-issues-when-moved-it-to-a-nuget-package/ for more details.