AuditLoggingPipeline 0.1.0

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

AuditLoggingPipeline

Non-blocking, multi-sink audit and state-trail logging for .NET APIs, built around a DispatchProxy-based interception pattern.

What it does

AuditingDispatchProxy<TInterface> transparently wraps a service interface implementation. Any invoked method whose name starts with Save, Add, Update, Archive, or Delete is observed asynchronously and turned into an AuditEntry — without ever delaying, blocking, or faulting the caller's original request. Entries are queued onto a bounded AuditChannel and drained by a background hosted service, AuditLogBackgroundService, which fans each entry out to every IAuditSink registered by the consuming application.

This library ships the interception mechanism and plumbing only. It does not ship any concrete sink implementation — each consuming application defines its own IAuditSink implementations for whatever purpose it needs (e.g. an action log persisted to an audit table, or a security/state-trail append-only history table), and registers zero, one, or several of them. Each registered sink is invoked and isolated independently: a slow or failing sink can never affect another sink, the channel drain loop, or the caller's original request.

Usage

// Startup
services.AddAuditLogging();
services.AddScoped<IAuditSink, MyActionLogSink>();
services.AddAuditedScoped<IClientService, ClientService>();

Design notes

  • One shared interception mechanism serves any number of logging purposes; adding a new purpose means writing a new IAuditSink implementation, not changing this library.
  • No purpose is hardcoded (no "action log" vs. "state trail" split baked into the proxy).
  • Sinks needing "previous state" for a state-trail use case are expected to rely on their own append-only table's most recent row for that entity — the proxy and this library do not fetch or supply prior state.
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
0.1.0 43 9/26/2026