Skip to content
Add support for sending NServiceBus logging through Serilog
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
license.txt
readme.md

readme.md

Add support for sending NServiceBus logging through Serilog

Already a Patron? skip past this section

Community backed

It is expected that all developers become a Patron to use any of these libraries. Go to licensing FAQ

Sponsors

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

Patrons

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

NuGet package

https://nuget.org/packages/NServiceBus.Serilog/ NuGet Status

Standard Logging Library

Pipe NServiceBus logging messages through to Serilog.

Documentation

https://docs.particular.net/nuget/NServiceBus.Serilog

Usage

var loggerConfiguration = new LoggerConfiguration();
loggerConfiguration.WriteTo.Console();
loggerConfiguration.MinimumLevel.Debug();
loggerConfiguration.WriteTo.File("logFile.txt");
var logger = loggerConfiguration.CreateLogger();

Log.Logger = logger;

//Set NServiceBus to log to Serilog
var serilogFactory = LogManager.Use<SerilogFactory>();
serilogFactory.WithLogger(logger);

Icon

Brain designed by Rémy Médard from The Noun Project.

You can’t perform that action at this time.