Is there a logging facade for the .NET world?

后端 未结 7 711
情深已故
情深已故 2020-12-13 06:17

I\'m somewhat new to the .NET stack and I was wondering if there is an equivalent to slf4j for the .NET platform. For me, logging to a Facade and being able to swap out logg

7条回答
  •  有刺的猬
    2020-12-13 06:41

    I had the same Problem. After going through those recommended above, I discovered Ninject.Extensions.Logging

    Which is great since a facade makes best sense in combination with DI anyway

    It comes with proxies for NLog, NLog2 & log4net.

    Here is a nice example on how to use it in combination with NLog: http://blog.tonysneed.com/2011/10/09/using-nlog-with-dependency-injection/

    I understand, that this question is already a couple of years old, but due to completeness for other users, I still chose to post this 'Solution'

提交回复
热议问题