Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

NLog.AzureAppCenter

NLog Target for Microsoft Visual Studio App Center with Azure

Version AppVeyor

How to use

  1. Install the package

    Install-Package NLog.Targets.AppCenter or in your csproj:

    <PackageReference Include="NLog.Targets.AppCenter" Version="1.0.0" />
  2. Add to your nlog.config:

    <extensions>
        <add assembly="NLog.Targets.AppCenter"/>
    </extensions>
  3. Use the target "appcenter" in your nlog.config

    <targets>
        <target name="appcenter" xsi:type="appcenter" layout="${message}" reportExceptionAsCrash="true">
    	<contextproperty name="logger" layout="${logger}" />
    	<contextproperty name="loglevel" layout="${level}" />
    	<contextproperty name="threadid" layout="${threadid}" />
        </target>
    </targets>
    <rules>
        <logger minLevel="Info" writeTo="appcenter" />
    </rules>

Configuration options for AppCenterTarget

  • AppSecret - Appsecret for starting AppCenter if needed (optional)
  • UserId - Application UserId to register in AppCenter (optional)
  • ReportExceptionAsCrash - Report all exceptions as crashes to AppCenter (default=false)
  • IncludeEventProperties - Include LogEvent properties in AppCenter properties (default=true)
  • IncludeMdlc - Include MappedDiagnosticsLogicalContext (MLDC) that can be provided with MEL BeginScope (default=false)
You can’t perform that action at this time.