Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1005 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 1005 Bytes

Collector.Serilog.Enrichers.Assembly

Build status

Enriches Serilog events with information from the process environment using assembly information.

To use the enricher, first install the NuGet package:

Install-Package Collector.Serilog.Enrichers.Assembly

Then, apply the enricher to your LoggerConfiguration:

Log.Logger = new LoggerConfiguration()
    .Enrich.With<SourceSystemEnricher<ClassInAssemblyOfSourceSystem>>()
    // ...other configuration...
    .CreateLogger();

Included enrichers

The package includes:

  • SourceSystemEnricher<T> - adds SourceSystemEnricher based on the name of the assembly that T resides in.
  • SourceSystemInformationalVersionEnricher<T> - adds SourceSystemInformationalVersionEnricher based on the assembly's informational version.