在比较企业图书馆与log4net的日志记录应用程序块? [英] Compare Logging Application Block in Enterprise Library versus Log4net?

查看:246
本文介绍了在比较企业图书馆与log4net的日志记录应用程序块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以请比较这两个记录机制?

Can somebody please compare these two logging mechanism?

推荐答案

这已被写入有关颇有几分。这里有一些事情要阅读:

This has been written about quite a bit. Here are some things to read:

http://james.newtonking.com/archive/2007/06/05/enterprise-library-logging-vs-log4net.aspx
http://theiterator.com/2009/01/log4net-vs-enterprise-library-logging-应用程序块/
的http:// stackoverflow.com/questions/118047/log4net-vs-enterprise-library-which-is-better-faster

我的想法:


  • 普遍的共识似乎是,log4net的执行速度更快。这是否是一个典型的应用是有意义的为辩论。

  • 的log4net还支持分级伐木工人出来,这是很好的开箱。 EL可以执行类似的东西,但你必须推出自己的。

  • log4net的配置是有点神秘,而不是有据可查(IMO)。然而,EL的也麻烦配置(而痛苦没有配置工具)。此外EL给你,你可能要花费一些时间设计如此多的选择(例如,你想类别来进行相关的日志记录级别或层,或功能区域,或所有先前的,还是其他什么东西?)

如果您已经使用EL,你可能想只用EL坚持记录(它也集成了异常处理块)的一致性。如果我使用EL一个应用程序,那么我倾向于使用EL进行记录。如果没有,那么我通常倾向于为小型应用log4net的,因为安装时间通常较短。 (不责难人最喜爱的记录!:))

If you are already using EL, you may want to just stick with EL Logging (it also integrates with the Exception Handling Block) for consistency. If I'm using EL for an application, then I tend to use EL for logging. If not then I usually favor log4net for smaller applications since the setup time is usually shorter. (Not to impugn anyone's favorite logger! :) )

我用两个,发现他们都很好地工作。

I've used both and found that they both work well.

这篇关于在比较企业图书馆与log4net的日志记录应用程序块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆