Support & Documentation
Follow

Error Logging: Elmah

You can get started logging your Errors using an Elmah appender with minimal changes to your project. You essentially just add a few DLLs to your project and then add some configuration details to your .config file specifying an additional (or replacement) appender.

Getting Started Using NuGet

Getting Started Using NuGet

If you're using NuGet from Visual Studio, you can find and integrate the Stackify Elmah or Elmah MVC Appender libraries and configurations quickly and easily. Just search for Stackify and then install the Stackify Elmah Appender or Stackify Elmah MVC Appender (depending on your application type).

Configuring with NuGet

Configuring with NuGet

In order for the NuGet installation to complete, copy your Stackify Activation Key (license key) from your Stackify account page and paste it here. Once this is complete, you are done with the installation and configuration of the Stackify Elmah Appender.

A Note About Error Results on Unmonitored Servers

If you are logging errors from a server that doesn't have a Stackify monitoring agent on it, you have to add an Environment key to the appSettings section of your configuration, as it cannot be inferred by Stackify without an agent running on the machine.

It should also be noted that if you are logging errors for your application and that application doesn't appear as an app in the App Stacks page, the only way to see error telemetry is from the global Error Dashboard page, as there will be no App Dashboard for that application if it's not installed on a server that is being monitored.

Below is an example of the setting needed if you are logging errors from an unmonitored server:

<appSettings>
   <add key="Stackify.ApiKey" value="Your Activation Key" />
   <add key="Stackify.AppName" value="Your App Name"/>
   <add key="Stackify.Environment" value="Your Environment"/> <!-- optional - inferred by Stackify if running on a monitored server --></appSettings>
Was this article helpful?
0 out of 1 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Thomas Eyde

    This article only explains how to install the nuget-package, but not how to really log with Elmah. The github-page that opens after installing has nothing about Elmah at all.

Powered by Zendesk