具有 C# 电子邮件功能的开源异常日志记录解决方案
有人可以推荐任何开源或免费的异常 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如其他人已经建议的那样, 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).
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
您可以使用 log4net。
查看配置示例了解如何配置电子邮件等。
You can use log4net.
Check out the config examples to see how to configure email among other things.