Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Latest commit

 

History

History
22 lines (15 loc) · 584 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 584 Bytes

Serilog.Enrichers.ExceptionData

ExceptionDataEnricher

Enriches Serilog events with collection of key/value pairs from exception's Data property.

To use the enricher, first install the NuGet package:

Install-Package Serilog.Enrichers.ExceptionData

Then, apply the enricher to you LoggerConfiguration:

Log.Logger = new LoggerConfiguration()
    .Enrich.WithExceptionData()
    // ...other configuration...
    .CreateLogger();

The WithExceptionData() enricher will add a properties from exception's Data property to produced events.