2

I have gone through Elmah documentation, it says it is for asp.net but it do not say anything that if can be used or not for non IIS applications.

It is a sort of mystery for me now because we are considering using it in a new project. I found this (Using ELMAH in a console application) thread where some people say it can be used but others say they left trying that.

Our interest in Elmah is that it handles nu-handled exceptions.

Can you please tell if you have tried this was it successful or what was conclusion.

4

1 回答 1

3

ELMAH 是为在 Web 上下文中处理异常而开发的。话虽如此,从控制台应用程序或 winforms 之类的日志记录没有问题。

我写了一篇关于通过 SeriLog 记录到 ELMAH 的博客文章,但是几乎每个记录框架都有附加程序:

https://docs.elmah.io/logging-to-elmah-io-from-serilog/

该示例显示了如何登录到 elmah.io,但您可以登录到 ELMAH 支持的任何数据存储。

于 2014-09-10T07:58:33.467 回答