How to use log4net with Dependency Injection
问题 I'm trying to figure out what the right patter and usage of log4net is with a dependency injection framework. Log4Net uses the ILog interface but requires me to call LogManager.GetLogger(Reflection.MethodBase.GetCurrentMethod().DeclaringType) in each class or method where I need to log information. This seems to go against IoC principles and couples me to using Log4Net. Should I somehow put in another layer of abstraction somewhere? Also, I need to log custom properties like the current user