STP.Audit 1.0.0
AuditTrail
A lightweight, RabbitMQ-based audit trail solution for distributed .NET applications.
Overview
The AuditTrail package provides a simple way to capture and store audit events across your application. It uses RabbitMQ as a message broker to decouple the generation of audit events from their processing and storage.
Basic Setup
Add the following to your Program.cs or Startup.cs:
// Add services
builder.Services.AddAuditServices(
uri: "amqp://guest:guest@localhost:5672/",
exchange: "audit_exchange"
);
// Configure middleware (for ASP.NET Core applications)
app.UseAuditTrail();
[Audited(AuditActions.StackAggregation.Scan)]
public async Task<IResult> ScanSerial(string serialNumber)
{
return ConvertResultToHttpResult(await _aggregationOperations.ScanFirstSerial(serialNumber, SourceType.NormalCartonAggregation));
}
## Requirements
- .NET 6.0 or later
- RabbitMQ 6.8.1
## License
MIT
```
No packages depend on STP.Audit.
.NET 8.0
- Identity.Common (>= 4.1.7)
- RabbitMQ.Client (>= 7.1.2)