【发布时间】:2011-11-18 10:57:04
【问题描述】:
是否可以使用 ELMAH 执行以下操作?
logger.Log(" something");
我正在做这样的事情:
try
{
// Code that might throw an exception
}
catch(Exception ex)
{
// I need to log error here...
}
ELMAH 不会自动记录此异常,因为它已被处理。
【问题讨论】:
-
为了将来参考,我写了一篇关于这个的帖子:Logging errors programmatically。我的ELMAH Tutorial 也有这方面的一些信息。
标签: c# exception-handling elmah error-logging