Elmah.AspNetCore
1.0.2
dotnet add package Elmah.AspNetCore --version 1.0.2
NuGet\Install-Package Elmah.AspNetCore -Version 1.0.2
<PackageReference Include="Elmah.AspNetCore" Version="1.0.2" />
paket add Elmah.AspNetCore --version 1.0.2
#r "nuget: Elmah.AspNetCore, 1.0.2"
// Install Elmah.AspNetCore as a Cake Addin #addin nuget:?package=Elmah.AspNetCore&version=1.0.2 // Install Elmah.AspNetCore as a Cake Tool #tool nuget:?package=Elmah.AspNetCore&version=1.0.2
Elmah.AspNetCore
ELMAH (Error Logging Middleware and Handlers) for ASP.NET Core.
Features include:
- Logging of unhandled exceptions
- Friendly UI to view captured errors along with contextual information
- Hooks to include handled exceptions and additional contextual information
- Various methods to persist error logs
- Supports securing UI via built-in ASP.Net Core functionality
- Notifications of errors through email or custom notifiers
- Integration with
Microsoft.Extensions.Logging
to capture logs made during a request - Supports .NET 6+
Basic usage
First, install the Elmah.AspNetCore Nuget package into your app.
dotnet add package Elmah.AspNetCore
Next, in your application's Program.cs file, configure Elmah:
using Elmah.AspNetCore;
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseElmah(); // <- Add this to configure Elmah
var app = builder.Build();
app.UseExceptionHandler();
app.UseElmahMiddleware(); // <- Add this to register middleware
app.MapElmah(); // <- Add this to register Elmah endpoints
builder.Host.UseElmah()
registers and configures the Elmah services. An overload which accepts an action is available to modify the configuration.
app.UseElmahMiddleware()
registers the middleware used by Elmah to start capturing errors and contextual information. Only middleware registered after the Elmah middleware will be included in the error capturing. It is recommended that this is included before most other middleware. For best results, call after the built-in UseExceptionHandler()
.
app.MapElmah()
registers the routes used to serve content for the Elmah UI. By default these will be under /elmah
, but the method includes an overload which allows overriding the root path.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net6.0
- Elmah.AspNetCore.Common (>= 1.0.1)
- HtmlAgilityPack (>= 1.11.59)
- Microsoft.Extensions.DiagnosticAdapter (>= 3.1.32)
- System.Diagnostics.DiagnosticSource (>= 7.0.2)
- System.Linq.Async (>= 6.0.1)
-
net7.0
- Elmah.AspNetCore.Common (>= 1.0.1)
- HtmlAgilityPack (>= 1.11.59)
- Microsoft.Extensions.DiagnosticAdapter (>= 3.1.32)
- System.Diagnostics.DiagnosticSource (>= 7.0.2)
- System.Linq.Async (>= 6.0.1)
-
net8.0
- Elmah.AspNetCore.Common (>= 1.0.1)
- HtmlAgilityPack (>= 1.11.59)
- Microsoft.Extensions.DiagnosticAdapter (>= 3.1.32)
- System.Diagnostics.DiagnosticSource (>= 7.0.2)
- System.Linq.Async (>= 6.0.1)
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.2 | 271 | 12/17/2024 |
1.0.1 | 5,108 | 2/4/2024 |
1.0.0 | 183 | 1/27/2024 |
1.0.0-preview.3 | 91 | 1/25/2024 |
1.0.0-preview.2 | 70 | 1/23/2024 |
1.0.0-preview.1 | 68 | 1/19/2024 |
1.0.0-preview.0 | 160 | 1/3/2024 |