企业库日志应用程序块的选项 [英] Enterprise Library Logging Application Block options

查看:167
本文介绍了企业库日志应用程序块的选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在日志记录应用程序块能够处理他们的这些situtations或组合?

Is the logging application block able to handle these situtations or combinations of them?


  • 如果日志记录失败,不抛出异常

    • 特殊例外情况/异常类型仅

    例如:

    我写一个售票系统为我们的团队。如果发送电子邮件上一张新票创作团队失败了,我希望它报告的异常/错误日志,但不是泡沫,这取决于用户,不管记录有多深后备栈出现故障,用户不需要一个错误信息,节约了票。一些错误位置/异常我希望冒泡,但大多数的人的,我处理的,现在我不知道。

    I am writing a ticketing system for our team. If emailing the team on a new ticket creation fails, I want it to report that to the exception/error log, but not bubble that up to the user, regardless of how deep in the fallback stack the logging fails, the user doesn't need an error message, the ticket saved. some error locations/exceptions I would want bubbled up, but most of the ones I'm dealing with right now I do not.

    推荐答案

    我与ELLAB的经验是,当它不工作,它几乎不可能找出原因。日志是这样的(一般)平凡到实现依靠这样的重量级组件在系统的一部分,如可以是一个完全的痛苦工作,并有时是没有意义的ELLAB。

    My experience with the ELLAB was that when it doesn't work its nearly impossible to figure out why. Logging is such a (normally) trivial-to-implement part of a system relying on such a heavyweight component such as the ELLAB which can be an utter pain to work with sometimes is pointless.

    我已经使用了三个日志平台 - log4net的,ELMAH和ELLAB - 并且已经推出我自己的。 ELLAB自带的EL的其他部分依赖和requries繁重起床和运行。 <击> L4D L4N是ELLAB的苗条版本,这是更容易得到持续,并提供等同的功能。 ELMAH是在网站上记录错误一个伟大的图书馆。

    I've used three logging platforms--Log4Net, ELMAH and the ELLAB--and have rolled my own. ELLAB comes with dependencies on the other parts of the EL and requries heavy lifting to get up and running. L4D L4N is a slimmer version of ELLAB which is easier to get going and offers equivalent functionality. ELMAH is a great library for logging errors in websites.

    我建议,使用前ELLAB L4N特别是如果你不使用任何其他EL块。如果你在企业库倚重,ELLAB可能是你最好的选择;祝你好运,如果没有任何反应,但是。网站一定要使用ELMAH。如果你正在写一个小程序想想滚动自己的日志代码。

    I'd suggest using L4N before ELLAB, especially if you aren't using any other EL blocks. If you're relying heavily on the Enterprise Library, ELLAB may be your best bet; good luck if nothing happens, however. Websites should definitely use ELMAH. And if you're writing a smaller app think about rolling your own log code.

    这篇关于企业库日志应用程序块的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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