DMiddleware 9.0.0

dotnet add package DMiddleware --version 9.0.0
                    
NuGet\Install-Package DMiddleware -Version 9.0.0
                    
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="DMiddleware" Version="9.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DMiddleware" Version="9.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DMiddleware" />
                    
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 DMiddleware --version 9.0.0
                    
#r "nuget: DMiddleware, 9.0.0"
                    
#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 DMiddleware@9.0.0
                    
#: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=DMiddleware&version=9.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DMiddleware&version=9.0.0
                    
Install as a Cake Tool

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

</head> <body>

<h1>Request Logging Middleware</h1>

<p>The <strong>Request Logging Middleware</strong> is a custom ASP.NET Core middleware designed to log detailed information about incoming HTTP requests and their corresponding responses. It provides functionality to capture various metrics, including CPU and memory usage, response times, and request details, enhancing monitoring and troubleshooting capabilities in your application.</p>

<h2>Key Features</h2> <ul> <li><strong>Request and Response Logging</strong>: Logs the HTTP method, path, timestamp, and response status, along with request and response bodies (configurable).</li> <li><strong>Performance Metrics</strong>: Tracks CPU usage, memory consumption, and request duration for each processed request.</li> <li><strong>Error Handling</strong>: Captures and logs detailed error information if exceptions occur during request processing.</li> <li><strong>Configurable Options</strong>: Easily configurable options to choose what data to log (request body, headers, response, etc.).</li> <li><strong>Database Integration</strong>: Utilizes a database context to persist log entries for further analysis.</li> </ul>

<h2>Usage</h2> <h3>appSettings.json</h3> <p>insert the following configuration into <code>appSettings.json</code> file:</p> <pre><code>{ "HTTPLogConnection": { "DatabaseProvider": "", // SQL or PostgreSQL, the default is SQL "DefaultConnection": "" } }</code></pre>

<p>To use this middleware, configure it in your ASP.NET Core application’s startup/program.cs:</p>

<pre><code>services.ConfigureDMiddlewareServices(options => { options.SaveRequestBody = true; options.SaveRequesterInfo = true; options.SaveRequestHeader = true; options.SaveResponse = true; options.LogTheLoggDashboard = false; });</code></pre>

<p>Then add the middleware to the request pipeline:</p>

<pre><code>app.UseRequestLogging();</code></pre>

<h4>Accessing the Logs Dashboard</h4>

<p> To access the logs dashboard, you can map the dashboard route by adding the following to your Configure method in Startup.cs or Program.cs:</p>

<pre><code>app.MapDLoggerDashboard();</code></pre> <p>Once the dashboard is configured, you can access it via the following URL:</p> <pre><code>yourURL/DLogger/index.html</code></pre>

<p>This middleware helps developers monitor application behavior and diagnose issues effectively, making it an essential tool for robust application logging.</p>

</body> </html>

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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
9.0.0 209 12/26/2024
8.1.0 199 1/30/2025
8.0.0 187 12/26/2024
7.1.0 179 1/30/2025
7.0.0 177 12/26/2024
6.1.0 214 1/30/2025
6.0.0 185 12/26/2024
5.5.3 371 1/31/2025
5.5.2 181 1/31/2025
5.5.1 204 1/30/2025
5.5.0 215 11/21/2024
5.4.0 200 11/21/2024
5.3.0 186 11/15/2024
5.2.0 185 10/27/2024
5.1.3 181 10/26/2024
5.1.1 185 10/26/2024
5.1.0 175 10/26/2024
5.0.0 182 10/26/2024
2.1.0 186 10/22/2024
2.0.0 187 10/22/2024
Loading failed