cCoder.Logging
2026.9.12.1250
dotnet add package cCoder.Logging --version 2026.9.12.1250
NuGet\Install-Package cCoder.Logging -Version 2026.9.12.1250
<PackageReference Include="cCoder.Logging" Version="2026.9.12.1250" />
<PackageVersion Include="cCoder.Logging" Version="2026.9.12.1250" />
<PackageReference Include="cCoder.Logging" />
paket add cCoder.Logging --version 2026.9.12.1250
#r "nuget: cCoder.Logging, 2026.9.12.1250"
#:package cCoder.Logging@2026.9.12.1250
#addin nuget:?package=cCoder.Logging&version=2026.9.12.1250
#tool nuget:?package=cCoder.Logging&version=2026.9.12.1250
cCoder.Logging
cCoder.Logging contains the Logging domain for the cCoder platform.
View the latest code coverage report
Local Configuration
Each executable binds the complete configuration root to its own
AppConfiguration. The Web composition root registers CoreData, Logging,
SecurityData, Security, and Eventing side by side. The HostedServices
composition root registers CoreData, Logging, and Eventing.
Persistence belongs to the Data domains. LoggingConfiguration contains only
Logging behavior; CoreData owns the database connection, Data registration,
and migrations. Likewise, SecurityData owns the Security database and
Security contains authentication behavior.
Functionality
The Logging domain provides:
- OData endpoints for reading and posting log entries and attached log data.
- A DB-backed
ILoggerprovider that can capture application logging calls into the logging tables. - App-aware log storage: persisted log entries include
AppIdso logs remain scoped to the owning aggregate root without adding a hard foreign key. - SignalR log streaming through the Web host at
/Api/Hubs/Logs. - A hosted retention cleaner that removes persisted log entries older than the configured retention period.
- A lightweight authenticated tester UI at
/tools/index.html.
Public log table APIs intentionally expose only GET and POST. Log records are append-only from the API surface; update, merge, patch, and delete operations are not exposed.
Contents
src/cCoder.LoggingThe main library package published to NuGet.src/Apps/Logging.WebThe standalone web host for the Logging domain. It hosts API, Swagger, SignalR log streaming, health, and the tester UI.src/Apps/Logging.HostedServicesThe hosted services process for scheduled logging work. It currently hostsLogRetentionCleaner.src/cCoder.Logging.TestsUnit tests for the domain.src/Apps/Logging.Web.AcceptanceTestsAcceptance tests for the Web host.src/Apps/Logging.HostedServices.AcceptanceTestsAcceptance tests for the Hosted Services host.
There is no integration test project currently because Logging does not initiate a cross-process application call chain.
Build
dotnet build src/cCoder.Logging.slnx -v minimal
Test
dotnet test src/cCoder.Logging.slnx -v minimal --no-build
Leave secrets blank in appsettings.json, define these user-level or
machine-level environment variables, restart Visual Studio, and press F5:
CoreData__ConnectionStringSecurityData__ConnectionString(Web only)Security__DecryptionKey(Web only)Eventing__ServiceBus__ConnectionStringwhenEventing__ProviderTypeisServiceBus
CoreData__AdminConnectionString and
SecurityData__AdminConnectionString are optional migration-only overrides. If
an admin connection is configured, startup migrations use it and normal runtime
operations continue to use the regular connection. If it is omitted, migrations
use the regular connection.
No .env file or configuration conversion step is required.
Library consumers register persistence and behavior explicitly at their own
composition root: call AddData before AddLoggingWeb or
AddLoggingHostedServices; Web hosts also call AddSecurityData before
AddSecurityWeb. An application that consumes cCoder.Core should use Core's
composite API instead; Core deliberately composes its configured child domains
recursively.
Logging behavior is configured through LoggingConfiguration:
StoreLogEntriesEnables DB persistence for capturedILoggercalls.StreamLogEntriesEnables SignalR streaming from capturedILoggercalls in the Web host.RetentionDaysNumber of days of logs to retain. Defaults to30.RetentionIntervalMinutesHow often the hosted retention cleaner wakes up. Defaults to60.DefaultAppIdFallback App aggregate root id for captured logs when the app cannot be resolved from the request domain.DefaultAppDomainFallback app/domain thread name for captured logs and stream messages.RequestLoggingEnabledEnables automatic HTTP request capture fromStartLoggingWeb. Defaults totrue.RequestLoggingQueueCapacityMaximum number of request and application log snapshots awaiting background storage. Defaults to1024.RequestLoggingQueueFullBehaviorSelects whether queue pressure drops the newest or oldest snapshot. Defaults toDropNewest; request processing never waits for queue capacity.DatabaseMinimumLogLevelMinimumILoggerlevel persisted to SQL. Defaults toWarning. Useful entries below the threshold remain available to LogHub streaming. HTTP request summaries are unaffected by this threshold.
Acceptance tests read the same structured environment variables. A single shared
test configuration source derives isolated database names by appending
-acceptance-{guid}; tests never use the configured development databases
directly.
Package
The NuGet package produced by this repository is:
cCoder.Logging
Publishing
GitHub Actions is configured to publish the main package using NuGet trusted publishing.
Before the first publish, configure a trusted publishing policy on nuget.org for:
- Repository owner:
ccoder-co-uk - Repository:
cCoder.Logging - Workflow file:
publish.yml
The workflow also expects a NUGET_USER repository secret containing the nuget.org profile name used during trusted publishing login.
| 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
- cCoder.Data (>= 2026.8.28.1700)
- cCoder.Eventing (>= 2026.8.27.1708)
- Microsoft.AspNetCore.OData (>= 9.5.0)
- Microsoft.EntityFrameworkCore (>= 10.0.11)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.11)
- Microsoft.OpenApi (>= 2.7.5)
- Swashbuckle.AspNetCore.SwaggerGen (>= 10.2.3)
- System.Linq.Dynamic.Core (>= 1.7.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on cCoder.Logging:
| Package | Downloads |
|---|---|
|
cCoder.Core
cCoder.Core |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.9.12.1250 | 83 | 9/12/2026 |
| 2026.9.9.1004 | 169 | 9/9/2026 |
| 2026.9.8.2247 | 96 | 9/8/2026 |
| 2026.8.28.2141 | 211 | 8/28/2026 |
| 2026.8.27.1748 | 112 | 8/27/2026 |
| 2026.8.26.2246 | 147 | 8/26/2026 |
| 2026.8.10.1815 | 211 | 8/10/2026 |
| 2026.8.10.1329 | 107 | 8/10/2026 |
| 2026.8.8.1725 | 108 | 8/8/2026 |
| 2026.8.5.127 | 299 | 8/5/2026 |
| 2026.8.4.2230 | 154 | 8/4/2026 |
| 2026.8.4.1030 | 247 | 8/4/2026 |
| 2026.8.4.5 | 133 | 8/3/2026 |
| 2026.8.3.2113 | 109 | 8/3/2026 |
| 2026.8.3.1758 | 106 | 8/3/2026 |
| 2026.8.3.1741 | 117 | 8/3/2026 |
| 2026.8.2.2319 | 172 | 8/2/2026 |
| 2026.8.2.1333 | 117 | 8/2/2026 |
| 2026.8.1.1503 | 219 | 8/1/2026 |
| 2026.7.30.1728 | 325 | 7/30/2026 |