Skip to content

collector-bank/serilog-enrichers-assembly

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages