![]() |
VOOZH | about |
Requires NuGet 5.0.0 or higher.
dotnet add package Genocs.Logging --version 9.0.0
NuGet\Install-Package Genocs.Logging -Version 9.0.0
<PackageReference Include="Genocs.Logging" Version="9.0.0" />
<PackageVersion Include="Genocs.Logging" Version="9.0.0" />Directory.Packages.props
<PackageReference Include="Genocs.Logging" />Project file
paket add Genocs.Logging --version 9.0.0
#r "nuget: Genocs.Logging, 9.0.0"
#:package Genocs.Logging@9.0.0
#addin nuget:?package=Genocs.Logging&version=9.0.0Install as a Cake Addin
#tool nuget:?package=Genocs.Logging&version=9.0.0Install as a Cake Tool
Logging abstractions and extensions for Genocs applications. Supports net10.0, net9.0, and net8.0.
dotnet add package Genocs.Logging
Use this package to wire structured logging, CQRS handler logging behaviors, and correlation-aware middleware.
Supported sink families in this package are Console, File, OTLP (logs), Elasticsearch, Seq, Loki, and Azure Application Insights. Distributed tracing and metrics export should be handled by Genocs.Telemetry. Log export ownership should stay in Genocs.Logging.
UseLoggingAddCorrelationContextLoggingAddCommandHandlersLoggingAddEventHandlersLoggingMapLogLevelHandlerUseCorrelationContextLoggingAddCommandHandlersLogging() and AddEventHandlersLogging() discover handlers in the entry assembly by default.
If handlers are declared in another assembly (for example, separate application or feature projects), pass it explicitly:
builder.AddGenocs()
.AddCommandHandlersLogging(typeof(CreateOrder).Assembly)
.AddEventHandlersLogging(typeof(OrderCreated).Assembly);
Optional payload capture can be enabled via:
{
"logger": {
"httpPayload": {
"enabled": true,
"captureRequestBody": true,
"captureResponseBody": false,
"maxBodyLength": 4096
}
}
}
httpPayload.maxBodyLength is normalized to a safe bounded range.
Values less than or equal to 0 are treated as 4096 and values above 16384 are capped.application/json, application/*+json) and ignores invalid patterns.http.request.body activity tag.http.response.body activity tag.32.64 characters.256 characters.logger.enabled defaults to true. Set it to false to disable sink and enrichment wiring from Genocs.Logging.logger.seq.enabled requires a non-empty logger.seq.url.logger.loki.enabled requires a non-empty logger.loki.url.MapLogLevelHandler is a POST endpoint that expects a level query-string value (for example /logging/level?level=Debug).AddCorrelationContextLogging only registers middleware; UseCorrelationContextLogging must be added to the app pipeline to activate it.Use one logging exporter ownership path per environment to avoid duplicate log ingestion. Genocs.Telemetry is traces-and-metrics only and does not wire OpenTelemetry log exporters.
Use OpenTelemetry Azure Monitor exporter for all three signals and keep Serilog Azure/OTLP sinks disabled to avoid duplicates.
{
"logger": {
"otlpEndpoint": null,
"azure": {
"enabled": false
}
},
"telemetry": {
"enabled": true,
"exporter": {
"enabled": false
},
"azure": {
"enabled": true,
"enableTracing": true,
"enableMetrics": true,
"enableLogging": true,
"connectionString": "InstrumentationKey=<<key>>;IngestionEndpoint=https://<<region>>.in.applicationinsights.azure.com/"
},
"console": {
"enabled": false,
"enableTracing": false,
"enableMetrics": false,
"enableLogging": false
}
}
}
Use OTLP exporter for tracing only, disable OTLP logs/metrics, and keep Azure sinks disabled.
{
"logger": {
"otlpEndpoint": null,
"azure": {
"enabled": false
}
},
"telemetry": {
"enabled": true,
"exporter": {
"enabled": true,
"otlpEndpoint": "http://localhost:4317",
"protocol": "Grpc",
"enableTracing": true,
"enableMetrics": false,
"enableLogging": false
},
"azure": {
"enabled": false,
"enableTracing": false,
"enableMetrics": false,
"enableLogging": false
},
"console": {
"enabled": false,
"enableTracing": false,
"enableMetrics": false,
"enableLogging": false
}
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Genocs.Logging:
| Package | Downloads |
|---|---|
|
Genocs.Tracing
The tracing library to setup OpenTelemetry. |
|
|
Genocs.Monitoring
Telemetry and Tracing library. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.0 | 138 | 5/21/2026 |
| 9.0.0-beta009 | 135 | 5/11/2026 |
| 9.0.0-beta008 | 187 | 5/2/2026 |
| 9.0.0-beta007 | 107 | 4/29/2026 |
| 9.0.0-beta006 | 112 | 4/27/2026 |
| 9.0.0-beta005 | 129 | 4/26/2026 |
| 9.0.0-beta004 | 110 | 4/18/2026 |
| 9.0.0-beta003 | 147 | 4/5/2026 |
| 9.0.0-beta002 | 143 | 3/17/2026 |
| 9.0.0-beta001 | 146 | 2/28/2026 |
| 8.1.0 | 202 | 2/8/2026 |
| 8.0.0 | 2,739 | 11/23/2025 |
| 7.5.1 | 2,733 | 10/19/2025 |
| 7.5.0 | 5,382 | 10/12/2025 |
| 7.4.1 | 2,072 | 9/19/2025 |
| 7.4.0 | 319 | 9/19/2025 |
| 7.3.0 | 8,399 | 8/14/2025 |
| 7.2.5 | 13,751 | 5/1/2025 |
| 7.2.4 | 2,244 | 4/18/2025 |
| 7.2.3 | 17,636 | 1/20/2025 |
The change log and breaking changes are listed here.
https://github.com/Genocs/genocs-library/releases