I use Ninject as a DI Container in my application. In order to loosely couple to my logging library, I use an interface like this:
public interface ILogger
For all of you that are still looking for the correct answer, the correct implementation is :
public class LoggingModule : NinjectModule
{
public override void Load()
{
Bind().ToMethod(x => LogManager.GetLogger(x.Request.Target.Member.DeclaringType));
Bind().To()
.InSingletonScope();
}
}
Emphasis on:
x.Request.Target.Member.DeclaringType