diff --git a/src/Serilog.Enrichers.Thread/Enrichers/ThreadIdEnricher.cs b/src/Serilog.Enrichers.Thread/Enrichers/ThreadIdEnricher.cs index a19dc94..2ad07e5 100644 --- a/src/Serilog.Enrichers.Thread/Enrichers/ThreadIdEnricher.cs +++ b/src/Serilog.Enrichers.Thread/Enrichers/ThreadIdEnricher.cs @@ -31,7 +31,7 @@ public class ThreadIdEnricher : ILogEventEnricher /// /// The cached last created "ThreadId" property with some thread id. It is likely to be reused frequently so avoiding heap allocations. /// - private LogEventProperty _lastValue; + private LogEventProperty? _lastValue; /// /// Enrich the log event. diff --git a/src/Serilog.Enrichers.Thread/Enrichers/ThreadNameEnricher.cs b/src/Serilog.Enrichers.Thread/Enrichers/ThreadNameEnricher.cs index cffa6c0..d9b8cf4 100644 --- a/src/Serilog.Enrichers.Thread/Enrichers/ThreadNameEnricher.cs +++ b/src/Serilog.Enrichers.Thread/Enrichers/ThreadNameEnricher.cs @@ -32,7 +32,7 @@ public class ThreadNameEnricher : ILogEventEnricher /// /// The cached last created "ThreadName" property with some thread name. It is likely to be reused frequently so avoiding heap allocations. /// - private LogEventProperty _lastValue; + private LogEventProperty? _lastValue; /// /// Enrich the log event. diff --git a/src/Serilog.Enrichers.Thread/Serilog.Enrichers.Thread.csproj b/src/Serilog.Enrichers.Thread/Serilog.Enrichers.Thread.csproj index a9bd8d6..aa25c84 100644 --- a/src/Serilog.Enrichers.Thread/Serilog.Enrichers.Thread.csproj +++ b/src/Serilog.Enrichers.Thread/Serilog.Enrichers.Thread.csproj @@ -17,6 +17,8 @@ http://serilog.net Apache-2.0 false + latest + enable