RA.Utilities.Logging.Shared
10.0.0-rc.2
Prefix Reserved
dotnet add package RA.Utilities.Logging.Shared --version 10.0.0-rc.2
NuGet\Install-Package RA.Utilities.Logging.Shared -Version 10.0.0-rc.2
<PackageReference Include="RA.Utilities.Logging.Shared" Version="10.0.0-rc.2" />
<PackageVersion Include="RA.Utilities.Logging.Shared" Version="10.0.0-rc.2" />
<PackageReference Include="RA.Utilities.Logging.Shared" />
paket add RA.Utilities.Logging.Shared --version 10.0.0-rc.2
#r "nuget: RA.Utilities.Logging.Shared, 10.0.0-rc.2"
#:package RA.Utilities.Logging.Shared@10.0.0-rc.2
#addin nuget:?package=RA.Utilities.Logging.Shared&version=10.0.0-rc.2&prerelease
#tool nuget:?package=RA.Utilities.Logging.Shared&version=10.0.0-rc.2&prerelease
<p align="center"> <img src="https://raw.githubusercontent.com/RedonAlla/RA.Utilities/7609528d2f5783472cd1b6a8be8cc20957e85fbb/Assets/Images/log.svg" alt="RA.Utilities.Logging.Shared Logo" width="128"> </p>
RA.Utilities.Logging.Shared
RA.Utilities.Logging.Shared provides shared components and abstractions for logging HTTP requests and responses within the RA.Utilities ecosystem.
This package contains core models and helpers used by other logging libraries, such as RA.Utilities.Api.Middlewares, to ensure a consistent approach to capturing and structuring diagnostic information for HTTP calls.
Purpose
This package is a foundational library and is not intended for direct use in most applications.
Its primary role is to provide a common set of data structures (models) that other RA.Utilities packages can rely on for logging HTTP traffic.
By centralizing these models, we ensure that any middleware or service that logs HTTP requests and responses does so in a consistent, structured format.
🛠️ Installation
While you typically won't need to install this package directly, it is available on NuGet.
It will be included automatically when you install a dependent package like RA.Utilities.Api.Middlewares.
dotnet add package RA.Utilities.Logging.Shared
Core Components
This package provides the data models used to structure log information for HTTP interactions.
BaseHttpLogTemplate
public class BaseHttpLogTemplate
This is the primary model used to capture a complete picture of an HTTP request-response cycle.
Properties
Base containing HTTP request response properties for logging.
| Name | Type | Required | Description |
|---|---|---|---|
| RequestId. | string |
Unique identifier to represent this request in trace logs. | |
| TraceIdentifier | string |
false | Unique identifier to represent this request in trace logs. Value of HttpContext.TraceIdentifier |
| Path | string |
false | The URI used by the request message. |
| RequestedOn | DateTime |
true | DateTime requested on. Default value DateTime.UtcNow |
| RemoteAddress | string |
false | The host name requested. This is usually the DNS host name or IP address of the server. |
HttpRequestLogTemplate
Model for logging HTTP request.
public class HttpRequestLogTemplate : BaseHttpLogTemplate
HttpRequestLogTemplate inherits from [BaseHttpLogTemplate] so it will have all properties of [BaseHttpLogTemplate] class.
| Name | Type | Required | Description |
|---|---|---|---|
| Schema | string |
false | Scheme string of request Uri used by the request message. |
| Method | string |
false | The HTTP method used by the request message. |
| QueryString | string |
false | The query string used by the request message. |
| RequestHeaders | IDictionary<string, string> |
false | Collection of HTTP request headers used by the request message. |
| RequestBody | object |
false | HTTP Request body. |
HttpResponseLogTemplate
Model for logging HTTP response.
public class HttpResponseLogTemplate : BaseHttpLogTemplate
HttpResponseLogTemplate inherits from [BaseHttpLogTemplate] so it will have all properties of [BaseHttpLogTemplate] class.
| Name | Type | Required | Description |
|---|---|---|---|
| StatusCode | int |
true | The status code of the HTTP response. |
| ResponseHeaders | IDictionary<string, string> |
false | Collection of HTTP response headers. |
| ResponseBody | object |
false | HTTP Request body. |
Contributing
Contributions are welcome! If you have a suggestion or find a bug, please open an issue to discuss it. Please follow the contribution guidelines outlined in the other RA.Utilities packages.
| 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
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on RA.Utilities.Logging.Shared:
| Package | Downloads |
|---|---|
|
RA.Utilities.Api.Middlewares
RA.Utilities.Api.Middlewares provides a simple and efficient ASP.NET Core middleware for logging HTTP request and response details. It's designed to be easy to integrate, configurable, and performant, using Microsoft.IO.RecyclableMemoryStream to minimize memory allocations and improve application performance. |
|
|
RA.Utilities.Integrations
A utility library to simplify and standardize HTTP client calls in .NET applications. It builds upon `IHttpClientFactory` to provide a structured way to configure and use typed HTTP clients for various integrations. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0-rc.2 | 135 | 10/30/2025 |