xTech.Logging 1.0.0

dotnet add package xTech.Logging --version 1.0.0
                    
NuGet\Install-Package xTech.Logging -Version 1.0.0
                    
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="xTech.Logging" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="xTech.Logging" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="xTech.Logging" />
                    
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 xTech.Logging --version 1.0.0
                    
#r "nuget: xTech.Logging, 1.0.0"
                    
#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 xTech.Logging@1.0.0
                    
#: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=xTech.Logging&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=xTech.Logging&version=1.0.0
                    
Install as a Cake Tool

xTech.Logging

xTech/Okyanus ekosistemi için ortak Serilog loglama paketidir. Paketi ekleyen her proje, loglarını ortak tek bir Seq sunucusuna gönderir. Seq merkezi toplayıcıdır; her uygulama Application etiketiyle ayrışır, böylece Seq üzerinde proje bazında filtreleme yapılabilir.

Amaç

Loglama yapılandırmasını her projede tekrar yazmamak için ortak bir çekirdek sunar. Paket şu ortak davranışı taşır:

  • Ortak minimum log seviyeleri ve gürültü bastırma (Microsoft, AspNetCore, EntityFrameworkCore → Warning).
  • Ortak enrich'ler: MachineName, ThreadId, Application.
  • Ortak sink'ler: Console, File (günlük rolling), Seq (merkezi).
  • Opsiyonel HTTP request logging middleware.

Host proje isterse hiçbir ek ayar yapmadan varsayılanları kullanır; isterse appsettings.json içindeki Serilog section'ı ile bu davranışı ezer.

Kurulum

dotnet add package xTech.Logging

Kullanım

using xTech.Logging.Extensions;

var builder = WebApplication.CreateBuilder(args);

builder.Host.AddXTechSerilog("KocKit.Api");   // Seq URL appsettings'ten okunur

var app = builder.Build();

app.UseXTechRequestLogging();                  // opsiyonel HTTP request logu

app.MapControllers();
app.Run();

Yapılandırma

Merkezi Seq adresi ve API key appsettings.json üzerinden verilir:

{
  "Serilog": {
    "Seq": {
      "ServerUrl": "http://seq-sunucu:5341",
      "ApiKey": "opsiyonel-api-key"
    }
  }
}
  • Serilog:Seq:ServerUrl verilmezse Seq sink eklenmez; Console ve File çalışmaya devam eder.
  • Serilog:Seq:ApiKey opsiyoneldir.
  • Seq adresi kod tarafında da verilebilir: builder.Host.AddXTechSerilog("KocKit.Api", "http://seq:5341").

Standart Serilog yapılandırması ile varsayılanlar ezilebilir/genişletilebilir:

{
  "Serilog": {
    "MinimumLevel": {
      "Default": "Debug",
      "Override": { "Microsoft": "Warning" }
    }
  }
}

Yayınlama

Paket GitHub Packages üzerinden yayınlanır. v* formatında bir tag push edildiğinde .github/workflows/publish.yml iş akışı paketi paketleyip https://nuget.pkg.github.com/TechlifeBilisim/index.json feed'ine gönderir.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 135 7/10/2026