Is there a logging facade for the .NET world?

后端 未结 7 760
情深已故
情深已故 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 somehow found all solutions in here unsatisfying, especially for libraries/APIs. Although I never thought I would, I actually wrote an Open Source "logger" which should handle most concerns.

    Maybe you can have a look at Dapplo.Log, you can get it from NuGet.

    The idea is to use Dapplo.Log in your library, and the project which uses this can than direct (when needed) any log output to their logger of choice. Examples for directing the output can be found in the tests, with implementations of some major frameworks here.

    It's probably not perfect (yet), and I welcome pull-requests or tickets.

提交回复
热议问题