diff --git a/src/Serilog.Extensions.Hosting/Extensions/Hosting/DiagnosticContext.cs b/src/Serilog.Extensions.Hosting/Extensions/Hosting/DiagnosticContext.cs index af9b99f..dc8dde8 100644 --- a/src/Serilog.Extensions.Hosting/Extensions/Hosting/DiagnosticContext.cs +++ b/src/Serilog.Extensions.Hosting/Extensions/Hosting/DiagnosticContext.cs @@ -45,7 +45,7 @@ public DiagnosticContextCollector BeginCollection() } /// - public void Set(string propertyName, object value, bool destructureObjects = false) + public void Set(string propertyName, object? value, bool destructureObjects = false) { if (propertyName == null) throw new ArgumentNullException(nameof(propertyName)); diff --git a/src/Serilog.Extensions.Hosting/IDiagnosticContext.cs b/src/Serilog.Extensions.Hosting/IDiagnosticContext.cs index c867cf7..24ee2e3 100644 --- a/src/Serilog.Extensions.Hosting/IDiagnosticContext.cs +++ b/src/Serilog.Extensions.Hosting/IDiagnosticContext.cs @@ -29,7 +29,7 @@ public interface IDiagnosticContext /// The property value. /// If true, the value will be serialized as structured /// data if possible; if false, the object will be recorded as a scalar or simple array. - void Set(string propertyName, object value, bool destructureObjects = false); + void Set(string propertyName, object? value, bool destructureObjects = false); /// /// Set the specified exception on the current diagnostic context.