![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Observability.Logging --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Observability.Logging -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Observability.Logging" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Observability.Logging" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Observability.Logging" />Project file
paket add Rig.TUnit.Observability.Logging --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Observability.Logging, 0.1.0-beta.2"
#:package Rig.TUnit.Observability.Logging@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Observability.Logging&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Observability.Logging&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
In-memory
ILogger<T>capture with structured-scope stack, fluentLogAssert, and runtimeAntiPatternDetector(PII + interpolated templates).
A logging integration-test fixture. LoggingFixture provides a
CreateLogger(category) factory backed by an in-memory ILoggerProvider
that captures every log entry plus the full BeginScope stack.
LogAssert gives fluent assertions over the captured entries:
LogAssert.Logged(fx, LogLevel.Information).WithProperty("OrderId", 42).Once().
AntiPatternDetector runs at assertion time and catches two of the
most common logging foot-guns: PII in structured properties and
string-interpolated log templates.
$"...") before they land in prod.Microsoft.Extensions.Logging (transitive)using Microsoft.Extensions.Logging;
using Rig.TUnit.Observability.Logging.Fixtures;
await using var fx = new LoggingFixture();
await fx.InitializeAsync();
fx.CreateLogger("Orders").LogInformation("Processing {OrderId}", 42);
| Property | Type | Default | Description |
|---|---|---|---|
MinLevel |
LogLevel |
Trace |
Below this, entries are dropped |
CaptureScopes |
bool |
true |
Record BeginScope stack |
ThrowOnAntiPattern |
bool |
false |
If true, the fixture fails fast on detection |
Rig.TUnit.Observability.Logging.Fixtures.LoggingFixtureRig.TUnit.Observability.Logging.Options.LoggingFixtureOptionsRig.TUnit.Observability.Logging.Builder.LoggingRigBuilderRig.TUnit.Observability.Logging.Assertions.LogAssertRig.TUnit.Observability.Logging.Helpers.AntiPatternDetectorEach LoggingFixture owns its entry buffer. No shared state. Safe
under full parallelism.
LogAssert.Logged(…).Once() fails with 0 — the MinLevel
filtered the entry out. Check fx.MinLevel matches the level you
expect.AntiPatternDetector flags a non-PII property — tune the
AntiPatternDetector.IgnoreProperties list for the false positive.See .
BeginScope state is captured as an opaque object — the harness
deep-clones it via JsonSerializer so later mutations do not corrupt
the captured scope.{Name} placeholders are what gets
captured; positional {0}-style logs capture only the formatted
string. AntiPatternDetector flags the positional form.See ;
baseline in benchmarks/baseline-005.json.
MIT. See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 Rig.TUnit.Observability.Logging:
| Package | Downloads |
|---|---|
|
Rig.TUnit.All
Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices). |
|
|
Rig.TUnit.Microservices
Meta-package: Core + Mediator + Grpc + Outbox + Tracing + Jwt + Seq — the opinionated microservice testing kit. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 64 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 62 | 4/26/2026 |