Skip to content

Latest commit

 

History

History
61 lines (54 loc) · 3.74 KB

configuration.md

File metadata and controls

61 lines (54 loc) · 3.74 KB

Configuration Syntax

<target xsi:type="Bugsnag, NLog.Targets.Bugsnag"
        name="String" 
        apikey="Layout"
        releaseStage="Layout"
        context="Layout"
        errorClass="Layout">
  <app appType="Layout"
       version="Layout">
    <assembly name="String" /><!-- repeated -->
  </app>
  <request include="Boolean">
    <clientIp include="Boolean" layout="Layout" />
    <headers include="Boolean" layout="Layout" />
    <httpMethod include="Boolean" layout="Layout" />
    <referrer include="Boolean" layout="Layout" />
    <url include="Boolean" layout="Layout" />
  </request>
</target>

Parameters

Target Options

  • name - Name of the target (ie "bugsnag")
  • apiKey - [Required] The "Notifier API key" generated by Bugsnag when creating the project.
  • releaseStage - [Required] "production" or "development"
  • context - [Optional] Default: LogEventInfo.LoggerName
  • errorClass - [Optional] When not set, LogEventInfo.CallerMemberName and CallerLineNumber. But when "CallerInfo" was not set then default is "NLog".
  • endpoint - [Optional] The endpoint of Bugsnag server. This parameter was created for testing purpose, do not set unless you have a Bugsnag server on-premise.

App Options

These parameters can enrich the "APP" tab of the event in Bugsnag.

  • appType - [Optional] Put here a string that explain the type of your application (ie: "web", "job", "batch", "app-mobile"...)
  • version - [Optional] The version of your app. Default: ${assembly-version:type=File}
  • assemblies - [Optional] A collection of assemly name to include with their version. When you debug an issue you'd like to know which version of specified assemblies is in use, right?
    • name - The name of the assembly to get its version. This name will be interpolated with ${assembly-version} (ie. ${{assembly-version:name={name}:type=File}}

Request Options

These parameters can enrich the "REQUEST" tab of the event in Bugsnag.

Pay Attention!: if you don't specify the layout for each option you use, by default will be used "aspnet" layout renderers that require package NLog.Web is installed and configured as extension in nlog.config.