Serilog is a popular logging system specialized in Structured Logging - a logging approach that records named data structures along with log messages to make it easy to drill into the details without creating over-long log messages. It's great in modern applications to store additional context along with key log messages.
Loupe provides a Sink for Serilog to capture all of the log messages it publishes and map them into Loupe, putting them in context with the rest of the diagnostic information recorded by Loupe. The Loupe Agent for Serilog is published to NuGet, making it easy to add to your application. To get started, add the NuGet package:
Once you've added the NuGet package, register the Loupe sink like this:
var log = new LoggerConfiguration() .WriteTo.Loupe() //The call to .Loupe() is the only change .CreateLogger();
Of course, you may have more calls after LoggerConfiguration() to customize your Serilog configuration. Typically the .WriteTo calls are near the end of the configuration and just before CreateLogger.