TCIS.Logging.Serilog
1.0.3
See the version list below for details.
dotnet add package TCIS.Logging.Serilog --version 1.0.3
NuGet\Install-Package TCIS.Logging.Serilog -Version 1.0.3
<PackageReference Include="TCIS.Logging.Serilog" Version="1.0.3" />
<PackageVersion Include="TCIS.Logging.Serilog" Version="1.0.3" />
<PackageReference Include="TCIS.Logging.Serilog" />
paket add TCIS.Logging.Serilog --version 1.0.3
#r "nuget: TCIS.Logging.Serilog, 1.0.3"
#:package TCIS.Logging.Serilog@1.0.3
#addin nuget:?package=TCIS.Logging.Serilog&version=1.0.3
#tool nuget:?package=TCIS.Logging.Serilog&version=1.0.3
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",
"Args": {
"formatter": "TCIS.Logging.Serilog.TCISEcsJsonFormatter, TCIS.Logging.Serilog"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/log-.txt",
"rollingInterval": "Day",
"formatter": "TCIS.Logging.Serilog.TCISEcsJsonFormatter, TCIS.Logging.Serilog"
}
}
],
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
}
}
⚠️
formatteris mandatory on every sink, and it must beTCISEcsJsonFormatter.
MicrosoftLoggingSinkemits log records as"{@TCISEcsDocument}", andAddTSerilogregistersDestructure.AsScalar<TcisEcsDocument>()so the object reaches the formatter intact —TCISEcsJsonFormatterthen calls the Elastic SDK's ownSerialize().Any sink without that formatter — including the plain console sink and
CompactJsonFormatter, which this README previously showed — renders the scalar throughToString(). Every line comes out as the literal stringTCIS.Logging.TcisEcsDocument: message, exception and stack trace are all gone. The lines are still there and the levels are still right, so it reads as working until someone needs a stack trace. Measured on a generated project, where it hid the real cause of a 500 for several runs.
🚀 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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Elastic.CommonSchema (>= 8.11.0)
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0)
- Microsoft.Bcl.TimeProvider (>= 9.0.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0)
- Microsoft.Extensions.Configuration.UserSecrets (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- Serilog (>= 4.1.0)
- Serilog.Extensions.Hosting (>= 8.0.0)
- Serilog.Settings.Configuration (>= 8.0.4)
- Serilog.Sinks.Async (>= 2.1.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.File (>= 6.0.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.0)
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
- System.Threading.Channels (>= 8.0.0)
- TCIS.Logging (>= 1.0.3)
-
net8.0
- Elastic.CommonSchema (>= 8.11.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0)
- Microsoft.Extensions.Configuration.UserSecrets (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- Serilog (>= 4.1.0)
- Serilog.AspNetCore (>= 8.0.3)
- Serilog.Extensions.Hosting (>= 8.0.0)
- Serilog.Settings.Configuration (>= 8.0.4)
- Serilog.Sinks.Async (>= 2.1.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.File (>= 6.0.0)
- System.Diagnostics.DiagnosticSource (>= 10.0.0)
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
- System.Threading.Channels (>= 8.0.0)
- TCIS.Logging (>= 1.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TCIS.Logging.Serilog:
| Package | Downloads |
|---|---|
|
TCIS.Logging.Hosting
One-call TCIS application logging composition, startup lifecycle and downstream failure attribution. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.4 | 0 | 10/13/2026 |
| 1.0.3 | 0 | 10/13/2026 |
| 1.0.2 | 50 | 10/12/2026 |
| 1.0.2-rc.1 | 29 | 10/12/2026 |
| 1.0.1-rc.10 | 81 | 10/8/2026 |
| 1.0.1-rc.9 | 47 | 10/8/2026 |
| 1.0.1-rc.8 | 53 | 10/8/2026 |
| 1.0.1-rc.7 | 55 | 10/8/2026 |
| 1.0.1-rc.6 | 49 | 10/8/2026 |
| 1.0.1-rc.5 | 58 | 10/7/2026 |
| 1.0.1-rc.4 | 52 | 10/7/2026 |
| 1.0.1-rc.3 | 52 | 10/7/2026 |
| 1.0.1-rc.2 | 76 | 10/5/2026 |
| 1.0.1-rc.1 | 62 | 10/5/2026 |
| 1.0.0 | 97 | 10/1/2026 |
| 1.0.0-rc.52 | 64 | 9/29/2026 |
| 1.0.0-rc.51 | 72 | 9/23/2026 |
| 1.0.0-rc.50 | 74 | 9/21/2026 |
| 1.0.0-rc.49 | 80 | 9/18/2026 |
| 1.0.0-rc.47 | 67 | 9/17/2026 |