Most ASP.NET Core logging setups tell you that something failed β but not what actually happened during the request lifecycle.
I built AsGuard to provide lightweight request + exception logging with a built-in dashboard and minimal setup.
GitHub Repository:
https://github.com/mahmood-alsarraj/asguard
Why AsGuard?
- centralized request + exception visibility
- built-in dashboard
- minimal setup
- easier inspection during debugging
- lightweight integration
| Feature | Description |
|---|---|
| π Queue-based persistence | Non-blocking async writes - your API never waits for database |
| π Built-in dashboard | Beautiful Razor UI with dark/light mode and live updates |
| π Sensitive data masking |
[AsGuardMasked] attribute + configurable header redaction |
| π Body capture | Request/response bodies with content-type allowlist |
| π Correlation IDs | Distributed tracing with configurable headers (default: X-Correlation-ID) |
| β‘ Live SSE updates | Real-time push notifications without SignalR |
| ποΈ Multiple databases | SQL Server, PostgreSQL, SQLite, or In-Memory |
| π Exception analytics | Trends, severity summaries, and configurable alerts |
| π― Host ILogger capture | Automatically captures ILogger<T> warnings/errors |
| π Alerting system | Queue pressure, exception spikes, persistence failures |
| π‘ REST API | Full programmatic access to logs and stats |
| π§Ή Retention policies | Auto-cleanup with configurable intervals |
Quick Setup
dotnet add package AsGuard
builder.Services.AddRequestLogging(options =>
{
options.DatabaseProvider = LoggingDatabaseProvider.Sqlite;
options.ConnectionString = "Data Source=AsGuard.db";
options.DashboardRoute = "/request-logs-ui";
options.DashboardUsername = "admin";
options.DashboardPassword = "admin123";
options.EnableExceptionLogging = true;
options.LogRequestBody = true;
options.LogResponseBody = true;
});
var app = builder.Build();
app.UseExceptionHandler("/error");
// After the exception handler
app.UseRequestLogging();
Navigate to "/request-logs-ui", enter your credentials, and watch your applicationβs heartbeat in real-time.
Final Thoughts
Modern applications need visibility.
Sometimes you donβt need a massive observability platform β you just need a fast and practical way to inspect requests and exceptions.
Thatβs the problem AsGuard aims to solve for ASP.NET Core developers.
Resources:
- π¦ NuGet
- π Documentation
- π Issues
β Star the repo if AsGuard helps you!
For further actions, you may consider blocking this person and/or reporting abuse
