Logging

Component: Azure Cloud Service Host | Nuget: NServiceBus.Hosting.Azure (Version: 7.x)
Target NServiceBus Version: 6.x

The NServiceBus logging integrates with the Azure Diagnostics service through a simple trace logger.

Azure tooling for Visual Studio will setup the Azure Diagnostics Service and NServiceBus will integrate with it directly. Ensure that the following trace listener is added to the app.config, all NServiceBus logs will be forwarded to the diagnostics service. (Version may differ based on Azure tooling version)

Edit
<system.diagnostics>
  <trace>
    <listeners>
      <add
        type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        name="AzureDiagnostics">
        <filter type="" />
      </add>
    </listeners>
  </trace>
</system.diagnostics>

Logging settings can than be controlled by configuring the Azure diagnostics service itself using a .wadcfg or .wadcfgx file. For more information refer to the Configuring Diagnostics for Azure Cloud Services and Virtual Machines or Use the Azure Diagnostics Configuration File in Azure SDK 2.4 and earlier article on MSDN.

Related Articles

  • Logging
    Manage and integrate with NServiceBus logging.

Last modified