具有 C# 电子邮件功能的开源异常日志记录解决方案

发布于 2024-12-18 08:05:08 字数 106 浏览 3 评论 0原文

有人可以推荐任何开源或免费的异常 .net 日志记录解决方案,能够记录异常并将其通过电子邮件发送给开发人员吗?

这是针对 ac# winforms 应用程序的。

谢谢

Can anybody recommend any open source or free exception .net logging solutions that have the capability to log and email the exceptions to the developer?

This is for a c# winforms application.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

静若繁花 2024-12-25 08:05:08

正如其他人已经建议的那样, log4net 具有此功能,并且 所以 nlog

企业库日志记录块还可以配置为发送邮件,如此处所述

我建议您使用日志记录抽象 Common.Logging 这样您就可以在日志记录实现之间切换,而无需更改您的代码(例如在 log4net、nlog 和 enterprise-lib 之间切换)。

As others already suggested, log4net has this capability and so does nlog.

The Enterprise-library logging block can also be configured to send mails as described here.

I suggest you use the logging abstraction Common.Logging so you can switch between logging implementations without the need to change your code (e.g. switch between log4net, nlog and enterprise-lib).

何止钟意 2024-12-25 08:05:08

Apache log4net 是一个很好的日志框架,具有发送电子邮件的能力:http://sradack.blogspot.com/2007/09/have-log4net-send-email-when-error.html

Apache log4net is a good logging framework with the ability to send emails: http://sradack.blogspot.com/2007/09/have-log4net-send-email-when-error.html

一指流沙 2024-12-25 08:05:08

您可以使用 log4net

Apache log4net 库是一个帮助程序员将日志语句输出到各种输出目标的工具。 log4net 是优秀的 Apache log4j™ 框架到 Microsoft® .NE​​T 运行时的端口。我们保持该框架在精神上与原始 log4j 相似,同时利用 .NET 运行时中的新功能。

查看配置示例了解如何配置电子邮件等。

You can use log4net.

The Apache log4net library is a tool to help the programmer output log statements to a variety of output targets. log4net is a port of the excellent Apache log4j™ framework to the Microsoft® .NET runtime. We have kept the framework similar in spirit to the original log4j while taking advantage of new features in the .NET runtime.

Check out the config examples to see how to configure email among other things.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文