阅读背景:

如果使用日志facade,那么在使用IoC/DI时是否应该注入日志基础设施?

来源:互联网 

I am using Autofac as my IoC and from everything I have read on topic of DI teaches to use "constructor injection" to explicitly expose class dependencies... However, I am also using logging facade (Common.Logging) with Log4Net and have created Autofac module to inject it. Now, in every class in which I want to do some logging I have extra constructor parameter (see sample #1)....I am using Autofac as my IoC and from everythin




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: