Enable the trace listener in your project
After you create the installer class, you need to reference the custom trace listener in your project, so that you can use it in your site.
NOTE: You need a Raygun API key to run this sample. To acquire a Raygun API key, register in Raugun.io and create a new application on your Raygun.io dashboard.
To enable the custom error trace listener:
- Open your Sitefinity CMS application in Visual Studio.
- From the context menu of the solution, select Add » Existing project…
- Browse to the folder of the custom error trace listener.
- Select the ExternalLogging.csproj file.
- From the context menu of your project's Reference folder, select Add » References…
- Select the newly added ExternalLogging project.
- Open the web.config file of your Sitefinity CMS application and configure Raygun by adding a config section and a RaygunSettings configuration block in the following way:
NOTE: You can check the Raygun GitHub readme file for additional information about how to configure your application's web.config file.
- Save and close the
- Build your solution.
As a result, your Sitefinity CMS application errors are logged to the Raygun.io dashboard.