TCIS.Logging.Hosting 1.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package TCIS.Logging.Hosting --version 1.0.5
                    
NuGet\Install-Package TCIS.Logging.Hosting -Version 1.0.5
                    
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.Hosting" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TCIS.Logging.Hosting" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="TCIS.Logging.Hosting" />
                    
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.Hosting --version 1.0.5
                    
#r "nuget: TCIS.Logging.Hosting, 1.0.5"
                    
#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.Hosting@1.0.5
                    
#: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.Hosting&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=TCIS.Logging.Hosting&version=1.0.5
                    
Install as a Cake Tool

TCIS.Logging.Hosting

Composition package for application logging: real TCIS writers, ECS Serilog defaults, Autofac interception, exception classification, request context, lifecycle logging, and original failing service propagation over internal HTTP/gRPC calls.

Targets: net6.0, net8.0, net48, and net472. The ASP.NET Core entrypoints below work on both .NET 6 and .NET 8; Framework applications use RunFramework.

using TCIS.Logging.Hosting.Extensions;

var builder = WebApplication.CreateBuilder(args);
builder.AddTLoggingHost();
var app = builder.Build();
app.MapControllers();
await app.RunAsync();

To capture builder/configuration/build failures as well, use the lifecycle wrapper:

using TCIS.Logging.Hosting;

await TLoggingHost.RunAsync(args,
    builder => builder.Services.AddScoped<IOrderService, OrderService>(),
    app => app.MapControllers());

Only this package needs to be referenced. Business registrations and endpoints remain application responsibilities. No logging endpoint is exposed by default.

An A → B → C failure records service.name = a, custom.error.origin_service = c, and custom.error.propagation_path = [a,b,c] at A (these fields are outside the OPS v1.4 field catalog; they are written by default and omitted when TLogSettings:EmitExtensionFields=false). All participating applications must adopt the new package, using TCIS internal client extensions. Without peer metadata, only the immediate dependency can be identified.

Ngữ cảnh truy vết tự điền trên mọi bản ghi, kể cả log của framework (Wolverine, EF Core, Kestrel...) và consumer không có request HTTP: trace.id/span.id lấy từ Activity.Current; transaction.id lấy từ WorkContext (correlation id), không có thì dùng span gốc cục bộ của tiến trình, không có Activity thì sinh Guid; user.name là anonymous khi chưa có người dùng. Giá trị caller đã đặt không bị ghi đè.

application.site_code lấy từ WorkContext.Tenant.SiteCode (kể cả accessor tự dựng ngữ cảnh lúc đọc), không có thì dùng TLogSettings:SiteCode. Log của framework cũng đi theo thứ tự này.

message luôn là một dòng, tối đa 512 ký tự (OPS mục 5): xuống dòng/tab gộp thành dấu cách, quá dài thì cắt và thêm .... Nội dung lỗi đầy đủ vẫn nằm ở error.message và error.stack_trace.

Log của framework mức ERROR/FATAL không kèm exception (driver Oracle, EF Core...) vẫn là bản ghi lỗi: custom.log_type=error, error.code=SYS-UNK-9999 (chưa phân loại), error.type=UnclassifiedError. Bản ghi framework có custom.code.namespace/class lấy từ tên logger. log.origin.function của log lỗi framework lấy từ stack tại nơi ghi log (frame đầu tiên ngoài hạ tầng logging, đã gỡ tên <Run>d__5.MoveNext của async/lambda); chỉ chụp stack cho mức ERROR/FATAL. Mã tenant ghi ở user.tenant_id (danh mục OPS v1.4), song song với organization.id (tên cũ, dashboard OPS và log eBerth đang đọc). Thời gian xử lý ghi ở event.duration_ms (mili giây, tên trường OPS), kèm event.duration (nano giây) và custom.duration_ms. Các trường mở rộng này (cùng custom.tcis_logging_version, custom.error.owner/origin_*) mặc định bật; đặt TLogSettings:EmitExtensionFields=false để bản ghi chỉ còn đúng trường của danh mục.

See the configuration and migration guide.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 Framework net472 is compatible.  net48 is compatible.  net481 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.6 37 10/20/2026
1.0.6-rc.1 29 10/20/2026
1.0.5 56 10/19/2026
1.0.4 55 10/13/2026
1.0.3 62 10/13/2026
1.0.2 66 10/12/2026
1.0.2-rc.1 52 10/12/2026
1.0.1-rc.10 92 10/8/2026
1.0.1-rc.9 54 10/8/2026
1.0.1-rc.8 53 10/8/2026
1.0.1-rc.7 60 10/8/2026
1.0.1-rc.6 57 10/8/2026
1.0.1-rc.5 63 10/7/2026
1.0.1-rc.4 53 10/7/2026
1.0.1-rc.3 54 10/7/2026
1.0.1-rc.2 79 10/5/2026