Fermion.EntityFramework.ExceptionLogs 1.0.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Fermion.EntityFramework.ExceptionLogs --version 1.0.1
                    
NuGet\Install-Package Fermion.EntityFramework.ExceptionLogs -Version 1.0.1
                    
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="Fermion.EntityFramework.ExceptionLogs" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fermion.EntityFramework.ExceptionLogs" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Fermion.EntityFramework.ExceptionLogs" />
                    
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 Fermion.EntityFramework.ExceptionLogs --version 1.0.1
                    
#r "nuget: Fermion.EntityFramework.ExceptionLogs, 1.0.1"
                    
#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 Fermion.EntityFramework.ExceptionLogs@1.0.1
                    
#: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=Fermion.EntityFramework.ExceptionLogs&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Fermion.EntityFramework.ExceptionLogs&version=1.0.1
                    
Install as a Cake Tool

Fermion.EntityFramework.ExceptionLogs

Fermion.EntityFramework.ExceptionLogs is a robust exception logging library for .NET applications, providing detailed tracking, filtering, and management of application exceptions. Built on top of Entity Framework Core and following clean architecture principles, it enables advanced exception analysis and operational insights.


Features

  • Centralized exception logging with rich context (fingerprint, stack trace, correlation/session IDs, etc.)
  • RESTful API for querying, filtering, and cleaning up exception logs
  • Advanced filtering by exception type, code, log level, status code, date range, and more
  • Custom middleware for global exception handling and logging
  • Extensible exception handling for authentication, authorization, business, validation, and user-friendly errors
  • Custom Serilog sink for forwarding logs to external systems (e.g., webhooks)
  • Auditing support for creation time and user
  • Automatic cleanup of old logs

Installation

  dotnet add package Fermion.EntityFramework.ExceptionLogs

Project Structure

The library follows Clean Architecture principles with the following layers:

Core

  • Base entities and interfaces
  • Domain models (ExceptionLog)
  • Configuration options

Infrastructure

  • Entity Framework Core configurations
  • Database context implementations
  • Repository implementations

Application

  • DTOs
  • Interfaces
  • Services
  • Mappings

Presentation

  • Controllers
  • API endpoints
  • Request/Response models

DependencyInjection

  • Service registration extensions
  • Configuration options
  • Middleware implementation
  • Exception handling and logging

Configuration

// Register exception log services in Program.cs or Startup.cs
builder.AddFermionExceptionLogServices<ApplicationDbContext>(opt =>
{
    opt.SerilogEnabled = true;
    opt.ConsoleEnabled = true;
    opt.FileEnabled = true;
    opt.WebhookOptions.WebhookEnabled = false;
    opt.WebhookOptions.WebhookUrl = "https://example.com/webhook";
    opt.WebhookOptions.Method = "POST";
    opt.WebhookOptions.BatchSizeLimit = 50;
    opt.WebhookOptions.Period = TimeSpan.FromSeconds(5);
    opt.WebhookOptions.QueueLimit = 500;
    opt.WebhookOptions.RestrictedToMinimumLevel = Serilog.Events.LogEventLevel.Error;
});

// Configure DbContext
public class YourDbContext : DbContext 
{
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);
        // Apply ExceptionLog configurations
        modelBuilder.ApplyConfigurationsFromAssembly(typeof(ExceptionLogConfiguration).Assembly);
    }
}

// Configure middleware in Program.cs
var app = builder.Build();

// Add exception logging middleware (should be one of the first middleware)
app.UseFermionExceptionMiddleware();

// Add other middleware
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();

API Endpoints

The library provides the following RESTful API endpoints when EnableApiEndpoints is set to true:

  • GET /api/exception-logs/{id} - Get specific exception log details
  • GET /api/exception-logs/pageable - Get exception logs with filtering and pagination
  • DELETE /api/exception-logs/cleanup - Clean up old exception logs

Product Compatible and additional computed target framework versions.
.NET 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.  net10.0 was computed.  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