InterpolatedLogging - ILogger extensions to accept Interpolated Strings in Structured Logging

This page summarizes the projects mentioned and recommended in the original post on /r/dotnet

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • InterpolatedLogging

    Wrappers around ILoggers (Microsoft Extensions Logging, Serilog, NLog, etc) to accept Interpolated Strings

  • csharplang

    The official repo for the design of the C# programming language

  • You should take a look at the improved interpolated string builder proposal I'm working on for C# 10: https://github.com/dotnet/csharplang/blob/main/proposals/improved-interpolated-strings.md. One of the current problems with interpolated strings for logging is unwanted calls to string.Format and computation of the holes when the current log level isn't enabled, and this proposal will allow you define a builder type that interpolated string literals will be convertible to. This builder will be able to take in context information, and prevent unnecessary formatting costs by simply returning false during builder creation.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • DapperQueryBuilder

    Dapper Query Builder using String Interpolation and Fluent API

  • LOL. Just a bored developer who saw an opportunity. :-) When I posted a few days ago about DapperQueryBuilder someone suggested that this same FormattableString-hacking could be used for Logging libraries. Since the major parts of processing FormattableString are identical (same regex, same loops, etc) and since I was a little bored this weekend I decided to try out this idea :-)

  • designs

    This repo is used for reviewing new .NET designs.

  • Take a look at Compile-time source generation for structured log messages by maryamariyan · Pull Request #195 · dotnet/designs (github.com) as well

  • LoggingGenerator

    Discontinued Prototype source generator model for .NET

  • Sorry, I've replied the wrong message. I was referring to this https://github.com/geeknoid/LoggingGenerator which was mentioned below.

  • EntityFrameworkCore.RawQueryBuilder

    Entity Framework Core Query Builder (allows to dynamically add conditions) using Raw SQL statements and string interpolation

  • @Willinton06 - Ok, ok. You busted me out - I love string interpolation! New project: https://github.com/Drizin/EntityFrameworkCore.RawQueryBuilder

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts