Skip to content

alsi-lawr/alsi.serilog.enrichers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8c02a20 · Sep 5, 2024

History

4 Commits
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024
Sep 5, 2024

Repository files navigation

ALSI.Serilog.Enrichers

NuGet Version Build Status Downloads codecov

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.

Getting Started

Installation

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

Usage

Basic Example

using ALSI.Serilog.Enrichers;
using Serilog;

Log.Logger = new LoggerConfiguration()
    .Enrich.FromEnvironment()
    .Enrich.FromLokiLevels()
    .Enrich.ByDropping("my_property")
    ...

Contributing

We welcome contributions! Feel free to open an issue or submit a pull request on GitHub.

Building Locally

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

About

A .NET library that provides enrichers for Serilog.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages