Serilog Expressions

screenshot of Serilog Expressions

An embeddable mini-language for filtering, enriching, and formatting Serilog events, ideal for use with JSON or XML configuration.

Overview:

The Serilog Expressions is an embeddable mini-language designed for filtering, enriching, and formatting Serilog events, making it ideal for use with JSON or XML configurations. This tool enhances Serilog's capabilities by adding extension methods to configuration objects and providing a customized ExpressionTemplate type compatible with various Serilog sinks.

Features:

  • Embeddable Mini-Language: Allows for filtering, enriching, and formatting Serilog events.
  • Extension Methods: Adds extension methods to Serilog's Filter, WriteTo, and Enrich configuration objects.
  • ExpressionTemplate Class: Facilitates text formatting with .NET format strings and supports customizable color themes for Console sink.

Summary:

In summary, Serilog Expressions provides a powerful solution for customizing the filtering, enriching, and formatting of Serilog events. By leveraging an embeddable mini-language and the ExpressionTemplate class, users can effectively enhance their logging configurations within their applications.