rstackhouse / Serilog.Enrichers.ApplicationName

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serilog.Enrichers.ApplicationName

Enriches Serilog events with the application name.

NuGet Version

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.

Included enrichers

The package includes:

  • WithApplicationName() - adds ApplicationName based on PlatformServices class as a lower invariant string

Copyright © 2018 engelbert strauss GmbH & Co KG.

About

License:MIT License


Languages

Language:PowerShell 58.6%Language:C# 41.4%