Serilog.Enrichers.Redis
0.0.4
dotnet add package Serilog.Enrichers.Redis --version 0.0.4
NuGet\Install-Package Serilog.Enrichers.Redis -Version 0.0.4
<PackageReference Include="Serilog.Enrichers.Redis" Version="0.0.4" />
<PackageVersion Include="Serilog.Enrichers.Redis" Version="0.0.4" />
<PackageReference Include="Serilog.Enrichers.Redis" />
paket add Serilog.Enrichers.Redis --version 0.0.4
#r "nuget: Serilog.Enrichers.Redis, 0.0.4"
#:package Serilog.Enrichers.Redis@0.0.4
#addin nuget:?package=Serilog.Enrichers.Redis&version=0.0.4
#tool nuget:?package=Serilog.Enrichers.Redis&version=0.0.4
Serilog.Enrichers.Redis
Serilog enricher for StackExchange.Redis exceptions. Adds structured diagnostic properties from Redis timeout and connection errors to help troubleshoot and monitor Redis behavior in distributed .NET applications.
Features
- Enriches log events with Redis exception details
- Captures Redis connection and command information
- Seamless integration with Serilog
Installation
Install via NuGet:
dotnet add package Serilog.Enrichers.Redis
Or using the Package Manager:
Install-Package Serilog.Enrichers.Redis
Usage
Add the Redis enricher to your Serilog configuration:
using Serilog;
using Serilog.Enrichers.Redis;
Log.Logger = new LoggerConfiguration()
.Enrich.WithRedisExceptionEnricher()
.WriteTo.Console()
.CreateLogger();
Now, any Redis-related exceptions will include additional context in your logs.
Using appsettings.json
You can also configure Serilog and the Redis enricher via appsettings.json
:
appsettings.json
{
"Serilog": {
"Using": [ "Serilog.Enrichers.Redis" ],
"Enrich": [ "WithRedisExceptionEnricher" ],
"WriteTo": [
{ "Name": "Console" }
]
}
}
Program.cs
using Serilog;
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(configuration) // assumes 'configuration' is your IConfiguration instance
.CreateLogger();
Make sure to add the necessary Serilog and enricher packages, and call ReadFrom.Configuration
with your loaded configuration.
Contributing
Contributions are welcome! Please open issues or submit pull requests.
If you have feature requests or questions, open a discussion or issue on GitHub.
To contribute:
- Fork this repository
- Create a feature branch
- Open a pull request describing your changes
License
This project is licensed under the MIT License. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Serilog (>= 2.12.0)
- StackExchange.Redis (>= 2.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.