NServiceBus Host Logging configuration

Component: NServiceBus Host
NuGet Package NServiceBus.Host (8-pre)
Target NServiceBus Version: 7.x
This page targets a pre-release version and is subject to change prior to the final release.
The NServiceBus host is being deprecated as of Version 9. Refer to the upgrade guide for further details.

Logging configuration

This article explains how to customize default configuration. Refer to the Profiles - Logging section for more details about logging configuration in built-in profiles.

Logging configuration for NServiceBus Host can be customized by providing endpoint configuration or using profiles.

Via endpoint configuration

To change the host's logging configuration, implement the IConfigureThisEndoint interface. Provide the custom configuration in the Customize method:

class CustomLogging :
    IConfigureThisEndpoint
{
    public void Customize(EndpointConfiguration configuration)
    {
        LogManager.Use<DefaultFactory>();
    }
}

Samples

Related Articles

  • Logging
    Manage and integrate with NServiceBus logging.

Last modified