Skip to content

Latest commit

 

History

History
70 lines (32 loc) · 2.84 KB

readme.source.md

File metadata and controls

70 lines (32 loc) · 2.84 KB

NServiceBus.MicrosoftLogging

Build status NuGet Status

Add support for NServiceBus to log to Microsoft.Extensions.Logging.

See Milestones for release notes.

Already a Patron? skip past this section

Community backed

It is expected that all developers either become a Patron to use NServiceBusExtensions. Go to licensing FAQ

Sponsors

Support this project by becoming a Sponsor. The company avatar will show up here with a website link. The avatar will also be added to all GitHub repositories under the NServiceBusExtensions organization.

Patrons

Thanks to all the backing developers. Support this project by becoming a patron.

NuGet package

https://nuget.org/packages/NServiceBus.MicrosoftLogging/ https://nuget.org/packages/NServiceBus.MicrosoftLogging.Hosting

Usage

snippet: MsLoggingInCode

Usage when hosting

As LoggerFactory implements IDisposable it must be disposed of after stopping the NServiceBus endpoint. The process for doing this will depend on how the endpoint is being hosted.

In a generic host

Disposing the LoggerFactory is done by the underlying infrastructure.

snippet: MsLoggingInGenericHost

Note: UseMicrosoftLogFactoryLogger requires adding NServiceBus.MicrosoftLogging.Hosting as a package dependency.

In a windows service

When hosting in a windows service LoggerFactory should be disposed of as part of the ServiceBase.OnStop execution.

snippet: MsLoggingInService

Icon

Abstract designed by Neha Shinde from The Noun Project.