Add support for sending NServiceBus logging message through Serilog
Switch branches/tags
Nothing to show
Clone or download
dependabot[bot] and SimonCropp Bump NServiceBus from 7.1.5 to 7.1.6 in /src (#44)
Bumps [NServiceBus](https://github.com/Particular/NServiceBus) from 7.1.5 to 7.1.6.
- [Release notes](https://github.com/Particular/NServiceBus/releases)
- [Commits](Particular/NServiceBus@7.1.5...7.1.6)

Signed-off-by: dependabot[bot] <support@dependabot.com>
Latest commit 17b2b77 Dec 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github GitHubSync update (#41) Dec 3, 2018
src Bump NServiceBus from 7.1.5 to 7.1.6 in /src (#44) Dec 12, 2018
.editorconfig GitHubSync update (#41) Dec 3, 2018
.gitignore Update .gitignore Dec 2, 2018
license.txt init Apr 22, 2013
readme.md fix license Dec 3, 2018

readme.md

Add support for sending NServiceBus logging message 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

Platinum Sponsors

Support this project by becoming a Platinum Sponsor. A banner with your company logo will be added here with a link to your website. The banner will also be added to all GitHub repositories under the NServiceBusExtensions organization. A "Sponsored by" text and link will be added the description of the NuGet Package for the life of your sponsorship. You also get 1 hour of remote support per month.

Gold Sponsors

Support this project by becoming a Gold Sponsor. A large company logo will be added here with a link to your website. The logo will also be added to all GitHub repositories under this organization.

Silver Sponsors

Support this project by becoming a Silver Sponsors. A medium company logo will be added here with a link to your website. The logo will also be added to all GitHub repositories under this organization.

Bronze Sponsors

Support this project by becoming a Bronze 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.

The NuGet package NuGet Status

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

PM> Install-Package NServiceBus.Serilog

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);

Tracing Library

Plugs into the low level NServiceBus pipeline to give more detailed diagnostics.

Documentation

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

Usage

var tracingLog = new LoggerConfiguration()
    .WriteTo.Console()
    .WriteTo.File("logFile.txt")
    .MinimumLevel.Information()
    .CreateLogger();

var serilogFactory = LogManager.Use<SerilogFactory>();
serilogFactory.WithLogger(tracingLog);

var config = new EndpointConfiguration("SeqSample");
var serilogTracing = configuration.EnableSerilogTracing(tracingLog);
serilogTracing.EnableSagaTracing();

To log to Seq use the following to create the Logger.

var tracingLog = new LoggerConfiguration()
    .WriteTo.Seq("http://localhost:5341")
    .MinimumLevel.Information()
    .CreateLogger();

Which will result in something like this

Icon

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