ALSI.Serilog.Enrichers is a .NET library that provides 3 enrichers
- Environment: enriches the log with the environment name and thread id that logged the message
- LokiLevel: enriches the log with a "level" that Loki can natively support
- Drop: enriches the log by dropping unwanted properties from the log message.
Install the NuGet package using the .NET CLI:
dotnet add package ALSI.Serilog.Enrichers
Or via the NuGet Package Manager:
Install-Package ALSI.Serilog.Enrichers
using ALSI.Serilog.Enrichers;
using Serilog;
Log.Logger = new LoggerConfiguration()
.Enrich.FromEnvironment()
.Enrich.FromLokiLevels()
.Enrich.ByDropping("my_property")
...
We welcome contributions! Feel free to open an issue or submit a pull request on GitHub.
Clone the repository:
git clone https://github.com/alsi-lawr/alsi.serilog.enrichers.git
cd ALSI.Serilog.Enrichers
Build the project:
dotnet build
Run tests:
dotnet test