Log4Net not logging in .NET WebApi project using UnityContainer
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a very basic C# .NET WebApi project using Unity.AspNet.WebApi and Unity.Mvc for dependency injection and Unity.log4net for logging. The injection into my controllers seems to be working correctly. The problem is that the logger never logs anything. The expected .log file is never created. When I inspect the logger object while debugging it has all the levels disabled (IsDebugEnable = false, IsErrorEnabled = false, etc.) It is running as if has ignored my log4net.config file. In the root of my project I have a log4net.config file that