TCIS.Logging.Serilog 1.0.0-rc.9

This is a prerelease version of TCIS.Logging.Serilog.
dotnet add package TCIS.Logging.Serilog --version 1.0.0-rc.9
                    
NuGet\Install-Package TCIS.Logging.Serilog -Version 1.0.0-rc.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TCIS.Logging.Serilog" Version="1.0.0-rc.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TCIS.Logging.Serilog" Version="1.0.0-rc.9" />
                    
Directory.Packages.props
<PackageReference Include="TCIS.Logging.Serilog" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TCIS.Logging.Serilog --version 1.0.0-rc.9
                    
#r "nuget: TCIS.Logging.Serilog, 1.0.0-rc.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TCIS.Logging.Serilog@1.0.0-rc.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TCIS.Logging.Serilog&version=1.0.0-rc.9&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TCIS.Logging.Serilog&version=1.0.0-rc.9&prerelease
                    
Install as a Cake Tool

TCIS.Logging.Serilog

A provider that integrates Serilog into the TCIS logging system.

🌟 Overview

This module automatically configures Serilog as the primary logging provider for the entire application, replacing the default Microsoft logging. It allows you to easily route logs to storage systems such as Elasticsearch, Seq, or Files with flexible formats (e.g., JSON).

📦 Installation

Install the package via NuGet or .NET CLI:

dotnet add package TCIS.Logging.Serilog

⚙️ Configuration (appsettings.json)

Standard Serilog configuration (Sinks, Enrichers, etc.):

{
  "Serilog": {
    "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
    "MinimumLevel": {
      "Default": "Information",
      "Override": {
        "Microsoft": "Warning",
        "System": "Warning"
      }
    },
    "WriteTo": [
      { "Name": "Console" },
      {
        "Name": "File",
        "Args": {
          "path": "Logs/log-.txt",
          "rollingInterval": "Day",
          "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact"
        }
      }
    ],
    "Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
  }
}

🚀 Usage

In Program.cs, call the AddTSerilog() extension on WebApplicationBuilder (required for ASP.NET Core applications using WebApplicationBuilder):

using TCIS.Logging.Serilog.Extensions;

var builder = WebApplication.CreateBuilder(args);

// Configure Serilog to replace Microsoft Logging
builder.AddTSerilog();

var app = builder.Build();
app.Run();

💡 Basic Example

After adding AddTSerilog(), all logging calls from TCIS.Logging (via ILogWriter) will be automatically handled and enriched by Serilog. You simply continue to use ILogWriter as usual.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-rc.9 32 7/21/2026
1.0.0-rc.8 29 7/21/2026
1.0.0-rc.7 44 7/17/2026
1.0.0-rc.6 56 7/7/2026
1.0.0-rc.5 60 7/7/2026
1.0.0-rc.4 64 6/24/2026
1.0.0-rc.2 62 5/12/2026
1.0.0-rc.1 63 5/12/2026