I am new to servicestack and elman logging.
Can any body suggest how do we integrate elmah in service stack applications.
Thank you...
In a nutshell, it involves four simple steps: 1 Download ELMAH and add the Elmah.dll assembly to your web application, 2 Register ELMAH's HTTP Modules and Handler in Web.config, 3 Specify ELMAH's configuration options, and 4 Create the error log source infrastructure, if needed. More ...
ELMAH provides a simple, yet powerful mechanism for logging errors in an ASP.NET web application. Like Microsoft's health monitoring system, ELMAH can log errors to a database and can send the error details to a developer via email.
For more information on ELMAH's error filtering capabilities, refer to the Error Filtering section in the ELMAH Articles. ELMAH provides a simple, yet powerful mechanism for logging errors in an ASP.NET web application.
Since ASP.NET Core no longer support proxy configuration through web.config, you can log to elmah.io by configuring a proxy manually: In this example, the elmah.io client routes all traffic through http://localhost:8000.
If you have an existing logging solution then you can use the ServiceStack.Logging.Elmah project. It is available via NuGet.
Exceptions, errors and fatal calls will be logged to Elmah in addition to the originally intended logger. For all other log types, only the original logger is used.
So if you are already using Log4Net then you can just configure Elmah like this
ElmahLogFactory factory = new ElmahLogFactory(new Log4NetFactory());
If you don't want to wrap in over an existing log then you can just research adding Elmah to any ASP.NET website. There is no reason it wouldn't work just because you are using ServiceStack.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With