From bbbb54b05bea2c8dc6246dc82369b1bd807390f9 Mon Sep 17 00:00:00 2001 From: Adnan Gohar Date: Tue, 12 Sep 2023 22:24:35 +0200 Subject: [PATCH] chore: deps upgrade --- MhLabs.SerilogExtensions/Enrichers/RequestPathEnrichment.cs | 2 ++ MhLabs.SerilogExtensions/MhLabs.SerilogExtensions.csproj | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/MhLabs.SerilogExtensions/Enrichers/RequestPathEnrichment.cs b/MhLabs.SerilogExtensions/Enrichers/RequestPathEnrichment.cs index e9f8f1b..cd0896f 100644 --- a/MhLabs.SerilogExtensions/Enrichers/RequestPathEnrichment.cs +++ b/MhLabs.SerilogExtensions/Enrichers/RequestPathEnrichment.cs @@ -8,6 +8,8 @@ public class RequestPathEnrichment : ILogEventEnricher public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) { var value = LogValueResolver.Resolve(this); + if (value == default(string)) return; // don't set null values + var property = new LogEventProperty("RequestPath", new ScalarValue(value)); logEvent.AddOrUpdateProperty(property); } diff --git a/MhLabs.SerilogExtensions/MhLabs.SerilogExtensions.csproj b/MhLabs.SerilogExtensions/MhLabs.SerilogExtensions.csproj index 1ed2fd4..978ac37 100644 --- a/MhLabs.SerilogExtensions/MhLabs.SerilogExtensions.csproj +++ b/MhLabs.SerilogExtensions/MhLabs.SerilogExtensions.csproj @@ -2,7 +2,7 @@ netstandard2.1 - 2.0.0 + 2.1.0 true true MhLabs.SerilogExtensions @@ -28,7 +28,7 @@ - +