Yapidoo.Common.Logging
1.0.0
dotnet add package Yapidoo.Common.Logging --version 1.0.0
NuGet\Install-Package Yapidoo.Common.Logging -Version 1.0.0
<PackageReference Include="Yapidoo.Common.Logging" Version="1.0.0" />
<PackageVersion Include="Yapidoo.Common.Logging" Version="1.0.0" />
<PackageReference Include="Yapidoo.Common.Logging" />
paket add Yapidoo.Common.Logging --version 1.0.0
#r "nuget: Yapidoo.Common.Logging, 1.0.0"
#:package Yapidoo.Common.Logging@1.0.0
#addin nuget:?package=Yapidoo.Common.Logging&version=1.0.0
#tool nuget:?package=Yapidoo.Common.Logging&version=1.0.0
Yapidoo.Common.Logging
Shared Serilog registration, correlation wiring, enrichers, and audit-safe logging helpers for Yapidoo .NET 10 backend services.
This is the maintained documentation file for the package.
What is in this package
builder.Host.UseYapidooSerilog(configuration, serviceName)services.AddYapidooCorrelation()LogPropertyNamesServiceNameEnricherCorrelationEnricherAuditLog
Installation
dotnet add package Yapidoo.Common.Logging
Project path
services/common/Yapidoo.Common.Logging
Usage
Program.cs
using Yapidoo.Common.Logging.Registration;
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseYapidooSerilog(builder.Configuration, "Yapidoo.Service.BFF.Api");
builder.Services.AddYapidooCorrelation();
AddYapidooCorrelation() automatically wires correlation middleware and Serilog log-context enrichment for request-scoped properties.
Baseline properties
The package standardizes these properties where relevant:
ServiceEnvironmentCorrelationIdTraceIdSpanIdUserIdClientIdEventNameEventId
Audit logging
Use AuditLog.Write(...) for audit-significant actions such as login, logout, token revocation, provider exchange, or invitation creation.
Example:
AuditLog.Write(logger, "login", "account", "success", userId: userId, clientId: clientId);
Change the code
Typical flow:
- Update registration, enrichers, constants, or audit helpers.
- Add or update tests in
tests/Yapidoo.Common.Logging.Tests/. - Run local validation:
dotnet restore services/common/Yapidoo.Common.Logging/Yapidoo.Common.Logging.sln
dotnet test services/common/Yapidoo.Common.Logging/Yapidoo.Common.Logging.sln
dotnet build services/common/Yapidoo.Common.Logging/Yapidoo.Common.Logging.csproj -c Release
Update downstream projects
For each service adopting the shared logging baseline:
- Add the package or project reference.
- Replace service-local Serilog bootstrap duplication with
UseYapidooSerilog(...). - Replace service-local correlation registration with
AddYapidooCorrelation(). - Keep service-specific business logs in the service, but follow shared property names.
Publish to NuGet
dotnet restore services/common/Yapidoo.Common.Logging/Yapidoo.Common.Logging.sln
dotnet test services/common/Yapidoo.Common.Logging/Yapidoo.Common.Logging.sln
dotnet build services/common/Yapidoo.Common.Logging/Yapidoo.Common.Logging.csproj -c Release
dotnet pack services/common/Yapidoo.Common.Logging/Yapidoo.Common.Logging.csproj -c Release --no-build
dotnet nuget push Yapidoo.Common.Logging.nupkg --api-key <api-key> --source https://api.nuget.org/v3/index.json
Package output:
services/common/Yapidoo.Common.Logging/bin/Release/Yapidoo.Common.Logging.<version>.nupkg
Usage rules
- use shared registration from this package instead of duplicating service-local Serilog bootstrap code
- keep secrets, tokens, passwords, and provider proofs out of logs
- keep business-specific event names and audit subjects in the consuming service
License
MIT
| Product | Versions 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. |
-
net10.0
- CorrelationId (>= 3.0.1)
- Serilog.AspNetCore (>= 9.0.0)
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 | 160 | 3/20/2026 |
Initial release with shared Serilog registration, correlation middleware wiring, enrichers, and audit helpers.