diff --git a/src/NLog.Extensions.Logging/Logging/NLogLoggerProvider.cs b/src/NLog.Extensions.Logging/Logging/NLogLoggerProvider.cs index a8adff9e..0bbd90bd 100644 --- a/src/NLog.Extensions.Logging/Logging/NLogLoggerProvider.cs +++ b/src/NLog.Extensions.Logging/Logging/NLogLoggerProvider.cs @@ -84,7 +84,7 @@ protected virtual void Dispose(bool disposing) { if (Options.ShutdownOnDispose) { - LogManager.Shutdown(); // TODO Fix global static. Instead use LogFactory-property + LogFactory.Shutdown(); } else { diff --git a/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj b/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj index 2da17313..65b76fa3 100644 --- a/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj +++ b/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj @@ -18,8 +18,8 @@ For ASP.NET Core, use NLog.Web.AspNetCore: https://www.nuget.org/packages/NLog.W NLog;Microsoft.Extensions.Logging;log;logging;logfiles;netcore -- LogFactory.Setup - Make RegisterConfigSettings public (#423) (@snakefoot) -- Bump NLog to 4.7.2 (#426) (@dependabot-preview[bot]) +- Fix ShutdownOnDispose to work with isolated LogFactory +- Bump NLog to 4.7.3 Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHANGELOG.MD @@ -63,7 +63,7 @@ Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHAN $(DefineConstants);NETSTANDARD - +