diff --git a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/DataStoreErrorLogger.cs b/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/DataStoreErrorLogger.cs index 09a6761206..2d4b44ccfd 100644 --- a/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/DataStoreErrorLogger.cs +++ b/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore/DataStoreErrorLogger.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore public class DataStoreErrorLogger : ILogger { #if NETSTANDARD1_3 - private readonly AsyncLocal _log = new AsyncLocal(); + private static readonly AsyncLocal _log = new AsyncLocal(); #else private static readonly string ContextName = "__DataStoreErrorLog" + AppDomain.CurrentDomain.Id; #endif