有没有日志记录门面的.NET世界吗?门面、世界、日志、NET

2023-09-02 02:08:00 作者:伱陪他聊天卻忘了我也寂寞

我有点新的.NET堆栈和我在想,如果有一个相当于 SLF4J ,在.NET平台。对我来说,记录到一个门面,并能够根据需要换出记录实现很有道理。此外,在SLF4J提供包装的API有救了我很多次,当我需要使用,这是对我没有用一个单一的日志框架codeD第三方库。

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 logging implementations as needed just makes sense. Furthermore, the wrapper APIs available in slf4j have saved me many times when I needed to use a third-party library that was coded against a single logging framework that I wasn't using.

有一个项目,在那里,作为记录器之间的立面像log4net的,n日志和企业图书馆?是否有包装,使我快捷的调用这些库和引导他们到另一个库?我应该开始了一个开源项目,要做到这一点我自己?这是问题的一个重复,因为我不知道正确的方式来问?反过来说,就是要做到这一点使用方面的定向编程常用的方法?

Is there a project out there that acts as a facade between loggers like log4net, nLog and Enterprise Library? Are there wrappers that allow me to shortcut calls to those libraries and direct them to another library? Should I start out an open source project to do this myself? Is this question a duplicate because I don't know the right way to ask? Conversely, is the common way to do this using aspect orient programming?

推荐答案

借口我用过这个东西,我忘了是不是Apache的版本。它实际上是开放源代码和一个名为通用基础设施项目的一部分。它也被称为共同记录。它的工作原理与MS企业,log4net的和其他人。它运作良好。

Excuse I used this thing and I forgot it wasn't the Apache version. It's actually open-source and part of a project called common infrastructure. It is also called common logging. It works with MS Enterprise, log4net and others. It works well.