The process enricher for Serilog.
To use the enricher, first install the NuGet package:
Install-Package Serilog.Enrichers.Process
Then add Enrich.WithProcessId()
and/or .WithProcessName()
to the LoggerConfiguration()
:
Log.Logger = new LoggerConfiguration()
.WriteTo.Console()
.Enrich.WithProcessId()
.Enrich.WithProcessName()
.CreateLogger();
Copyright © 2016 Serilog Contributors - Provided under the Apache License, Version 2.0.