Serilog.Enrichers.Assembly

Build status

Enriches Serilog events with information from the process environment.

To use the enricher, first install the NuGet package:

Install-Package 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.