Serilog Seq Logging

Component: Serilog Tracing | Nuget: NServiceBus.Serilog.Tracing (Version: 2.x)
This is a community run project
Target NServiceBus Version: 5.x

Prerequisites

An instance of Seq running one http://localhost:5341.

Code walk-through

Illustrates customizing logginNServiceBus.Serilog) usage by configuring Serilog targets and rules.

Configure Serilog

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

Pass that configuration to NServiceBus

Edit
var busConfiguration = new BusConfiguration();
busConfiguration.EndpointName("Samples.Logging.SerilogSeq");
busConfiguration.EnableFeature<TracingLog>();
busConfiguration.SerilogTracingTarget(tracingLog);

Related Articles

  • Logging
    Manage and integrate with NServiceBus logging.
  • Serilog Tracing
    Writing diagnostic log entries via Serilog Tracing.

Last modified