diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index bf986cd..e0c0049 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
- dotnet-version: 6.0.x
+ dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
diff --git a/Serilog.Enrichers.ClientInfo.nuspec b/Serilog.Enrichers.ClientInfo.nuspec
index c449ca9..5f80cb9 100644
--- a/Serilog.Enrichers.ClientInfo.nuspec
+++ b/Serilog.Enrichers.ClientInfo.nuspec
@@ -14,35 +14,33 @@
docs\README.md
assets\icon.png
serilog enrichers enricher ip correlation-id request header
- © 2024 Serilog Contributors
- Update documentation.
+ © 2025 Serilog Contributors
+
+ - Add Support for .NET 9.0
+ - Remove Support for .NET 6.0 and .NET 7.0
+ - Update Serilog to version 4.3.0
+ - Update dependencies
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
+
-
+
-
-
-
+
+
diff --git a/src/Serilog.Enrichers.ClientInfo/Extensions/ClientInfoLoggerConfigurationExtensions.cs b/src/Serilog.Enrichers.ClientInfo/Extensions/ClientInfoLoggerConfigurationExtensions.cs
index 2ddb236..6925e1a 100644
--- a/src/Serilog.Enrichers.ClientInfo/Extensions/ClientInfoLoggerConfigurationExtensions.cs
+++ b/src/Serilog.Enrichers.ClientInfo/Extensions/ClientInfoLoggerConfigurationExtensions.cs
@@ -19,10 +19,7 @@ public static class ClientInfoLoggerConfigurationExtensions
public static LoggerConfiguration WithClientIp(
this LoggerEnrichmentConfiguration enrichmentConfiguration)
{
- if (enrichmentConfiguration == null)
- {
- throw new ArgumentNullException(nameof(enrichmentConfiguration));
- }
+ ArgumentNullException.ThrowIfNull(enrichmentConfiguration, nameof(enrichmentConfiguration));
return enrichmentConfiguration.With();
}
@@ -47,10 +44,7 @@ public static LoggerConfiguration WithCorrelationId(
string headerName = "x-correlation-id",
bool addValueIfHeaderAbsence = false)
{
- if (enrichmentConfiguration == null)
- {
- throw new ArgumentNullException(nameof(enrichmentConfiguration));
- }
+ ArgumentNullException.ThrowIfNull(enrichmentConfiguration, nameof(enrichmentConfiguration));
return enrichmentConfiguration.With(new CorrelationIdEnricher(headerName, addValueIfHeaderAbsence));
}
@@ -67,15 +61,8 @@ public static LoggerConfiguration WithCorrelationId(
public static LoggerConfiguration WithRequestHeader(this LoggerEnrichmentConfiguration enrichmentConfiguration,
string headerName, string propertyName = null)
{
- if (enrichmentConfiguration == null)
- {
- throw new ArgumentNullException(nameof(enrichmentConfiguration));
- }
-
- if (headerName == null)
- {
- throw new ArgumentNullException(nameof(headerName));
- }
+ ArgumentNullException.ThrowIfNull(enrichmentConfiguration, nameof(enrichmentConfiguration));
+ ArgumentNullException.ThrowIfNull(headerName, nameof(headerName));
return enrichmentConfiguration.With(new ClientHeaderEnricher(headerName, propertyName));
}
diff --git a/src/Serilog.Enrichers.ClientInfo/Serilog.Enrichers.ClientInfo.csproj b/src/Serilog.Enrichers.ClientInfo/Serilog.Enrichers.ClientInfo.csproj
index 1f0f29e..a06cc56 100644
--- a/src/Serilog.Enrichers.ClientInfo/Serilog.Enrichers.ClientInfo.csproj
+++ b/src/Serilog.Enrichers.ClientInfo/Serilog.Enrichers.ClientInfo.csproj
@@ -1,15 +1,14 @@
-
-
-
- net6.0;net7.0;net8.0
+
+
+ net8.0;net9.0
Serilog.Enrichers.ClientInfo
Serilog
latest
- false
true
embedded
true
- 2.1.2
+ 2.2.0
+ 2.2.0
@@ -17,7 +16,6 @@
-
-
-
+
+
diff --git a/test/Serilog.Enrichers.ClientInfo.Tests/Serilog.Enrichers.ClientInfo.Tests.csproj b/test/Serilog.Enrichers.ClientInfo.Tests/Serilog.Enrichers.ClientInfo.Tests.csproj
index 4c6e7a0..dc3f541 100644
--- a/test/Serilog.Enrichers.ClientInfo.Tests/Serilog.Enrichers.ClientInfo.Tests.csproj
+++ b/test/Serilog.Enrichers.ClientInfo.Tests/Serilog.Enrichers.ClientInfo.Tests.csproj
@@ -1,13 +1,13 @@
- net8.0
+ net9.0
false
-
-
+
+