Host Default Logging

Component: NServiceBus Host
NuGet NServiceBus.Host (6.x)
Target NServiceBus Version: 5.x

Code walk-through

This sample shows how to customize logging when running inside the NServiceBus host.

Open the app.config file. See the Logging configuration section at the top as well as its contents:

<configuration>
  <configSections>
    <section name="Logging"
             type="NServiceBus.Config.Logging, NServiceBus.Core" />
   </configSections>
  <Logging Threshold="INFO" />
</configuration>

This code instructs NServiceBus to only output logs at a level of INFO or higher.

Related Articles

  • Logging
    Manage and integrate with NServiceBus logging.

Last modified