Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ShutdownOnDispose to work with isolated LogFactory #444

Merged
merged 1 commit into from
Aug 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/NLog.Extensions.Logging/Logging/NLogLoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ For ASP.NET Core, use NLog.Web.AspNetCore: https://www.nuget.org/packages/NLog.W
</Description>
<PackageTags>NLog;Microsoft.Extensions.Logging;log;logging;logfiles;netcore</PackageTags>
<PackageReleaseNotes>
- 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
</PackageReleaseNotes>
Expand Down Expand Up @@ -63,7 +63,7 @@ Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHAN
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="4.7.2" />
<PackageReference Include="NLog" Version="4.7.3" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
Expand Down