Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道 Elmah 可以用来手动记录错误,就像可以使用 log4net 一样。但是,是否可以像处理未处理的异常一样同时记录捕获的异常以及通过电子邮件发送异常。
谢谢你的时间
这个问题的答案是肯定的。
Elmah.ErrorSignal.FromCurrentContext().Raise(new Exception("logs it to ELMAH as well as it sends an email"));