BetterLogging 1.0.0-alpha260122
dotnet add package BetterLogging --version 1.0.0-alpha260122
NuGet\Install-Package BetterLogging -Version 1.0.0-alpha260122
<PackageReference Include="BetterLogging" Version="1.0.0-alpha260122" />
<PackageVersion Include="BetterLogging" Version="1.0.0-alpha260122" />
<PackageReference Include="BetterLogging" />
paket add BetterLogging --version 1.0.0-alpha260122
#r "nuget: BetterLogging, 1.0.0-alpha260122"
#:package BetterLogging@1.0.0-alpha260122
#addin nuget:?package=BetterLogging&version=1.0.0-alpha260122&prerelease
#tool nuget:?package=BetterLogging&version=1.0.0-alpha260122&prerelease

BetterLogging
⚠️ Status: Pre-release (alpha)
This package is a work in progress toward a stable, feature-rich release.
Overview
BetterLogging brings AI-assisted error analysis to .NET logging.
When an exception occurs, BetterLogging can send structured exception data to an AI model to:
- Summarize what the error means
- Explain common root causes
- Suggest possible fixes
The goal is to make debugging faster—especially in complex or hard-to-reproduce scenarios.
⚠️ Important Notes
- This package sends exception data to an external AI provider.
- Use selectively in production (e.g., error paths, sampled logs).
- AI responses are non-deterministic and should not be treated as authoritative.
- This package does not automatically catch exceptions — you opt in explicitly.
Installation
Because this package is currently pre-release, install with:
dotnet add package BetterLogging --prerelease
Usage
Register service
Add the custom services in your program.cs.
services.AddBetterLoggingServices(options =>
{
options.Model = Gemini.Models.FlashLite2_5;
options.ApiKey = "YOUR API-KEY";
});
Example usage in code
Use IAiExceptionExplainer AI to pass your exception and receive a detailed result.
try
{
ThrowSomething();
}
catch (Exception ex)
{
var ai = provider.GetRequiredService<IAiExceptionExplainer>();
var summary = await ai.ExplainAsync(ex);
logger.LogError("AI Summary:\n{Summary}", summary);
var p = 5;
}
License
This project is licensed under the MIT License.
| 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
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.2)
- Microsoft.Extensions.Options (>= 10.0.2)
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 |
|---|---|---|
| 1.0.0-alpha260122 | 93 | 1/22/2026 |
| 1.0.0-alpha260118-2 | 74 | 1/18/2026 |
| 1.0.0-alpha260118 | 72 | 1/18/2026 |
Cleaned up the setup.
Added icon.
Updated readme.