.NET logging framework [closed]

2020-01-28 02:39发布

In java world you have log4j and a a pretty decent logging framework, is there anything like that for C#/.NET?

标签: c# logging
16条回答
何必那么认真
2楼-- · 2020-01-28 02:52

I'd still say Log4Net is a safer options. Many other open source projects also use it, if you ever include one that does, then you've just reduced a dependency.

查看更多
做自己的国王
3楼-- · 2020-01-28 02:54

There's also nLog, which is rather similar, but a bit more lightweight with less configuration.

查看更多
干净又极端
4楼-- · 2020-01-28 02:54

Look at TraceSources and TraceListeners. It is built into .NET and configured with the config file.

查看更多
孤傲高冷的网名
5楼-- · 2020-01-28 03:02

The comments here seem to agree with Developer Dude and nzpcmad, as do I. Use Bit Factory, also called The Object Guy's Logging Framework.

查看更多
\"骚年 ilove
6楼-- · 2020-01-28 03:02

We've always used the MS P&P Enterprise Library Logging Application Block. It's not particulary cool or elegant, but it is pretty flexible and well designed. Main reason I think we use it is that we use a lot of the other components from the EL, and they of course all have dependencies on the logging module. More Info Here.

查看更多
家丑人穷心不美
7楼-- · 2020-01-28 03:02

No doubt, try: this. Hands down, it is the best for most applications. It isn't bloatware.

查看更多
登录 后发表回答