Enriches Serilog events with the application name.
To use the enricher, first install the NuGet package:
Install-Package Serilog.Enrichers.ApplicationName
Then, apply the enricher to you LoggerConfiguration
:
Log.Logger = new LoggerConfiguration()
.Enrich.WithApplicationName()
// ...other configuration...
.CreateLogger();
The WithApplicationName()
enricher will add a ApplicationName
property to produced events.
The package includes:
WithApplicationName()
- addsApplicationName
based onPlatformServices
class as a lower invariant string
Copyright © 2018 engelbert strauss GmbH & Co KG.