Should i stop using String Interpolation while logging?

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

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

    Simple .NET logging with fully-structured events

  • Hmm if this is the case that would be really cool. Even on their website, they don't use the `FormattableString` version (aka $"Creating user: {user}"). And I still see an open issue on serilogs GitHub tracker: https://github.com/serilog/serilog/issues/1643

  • InterpolatedLogging

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

  • It doesn't have to; you can use FormattableString. I don't really understand why logging frameworks don't want to do that, but you can use https://github.com/Drizin/InterpolatedLogging.

  • 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
  • isle

    ISLE (Interpolated String Logging Extensions) is a library that allows developers to perform structured logging using interpolated strings in C# 10 or later. (by fedarovich)

  • Unless that Verbose method accepts FormattableString and correctly handles all the metadata. Like this: https://github.com/fedarovich/isle

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