From 5cf0f9d17ffe57b5271ea8839bffd46d43bef3e9 Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Sun, 2 Feb 2025 17:42:46 +0100 Subject: [PATCH] Version 5.4 (#778) --- CHANGELOG.MD | 7 +++++++ appveyor.yml | 2 +- build.ps1 | 2 +- .../Logging/NLogLoggerFactory.cs | 12 +++++++++++- .../NLog.Extensions.Logging.csproj | 9 ++++----- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 6de6b43f..7fc1456e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,13 @@ Date format: (year/month/day) +### Version 5.4 (2025/02/02) + +**Improvements** +- [#775](https://github.com/NLog/NLog.Extensions.Logging/pull/775): MicrosoftConsoleJsonLayout - TimestampLayout replaced by DateLayoutRenderer (#775) (@snakefoot) +- [#778](https://github.com/NLog/NLog.Extensions.Logging/pull/778): NLogLoggerFactory - New constructor with isolated NLog LogFactory as input parameter (#778) (@snakefoot) +- [#778](https://github.com/NLog/NLog.Extensions.Logging/pull/778): Updated to NLog v5.4 (#778) (@snakefoot) + ### Version 5.3.15 (2024/11/21) **Improvements** diff --git a/appveyor.yml b/appveyor.yml index 8e25f204..a3941449 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,6 +37,6 @@ test_script: deploy: - provider: NuGet api_key: - secure: C4wzAE+AWne4TbR54gBDkLImCxsfIp21C16wi4LJ3bVSw/HqwZrMSYJ90kl6eAuf + secure: f6oWebyOFLpuuo2PMd6xgoxwMq+JvXVUmPyBme89zS7UF0zcvLYPSKN/p6B/KaMs on: branch: master diff --git a/build.ps1 b/build.ps1 index 2ec3cc11..710122a0 100644 --- a/build.ps1 +++ b/build.ps1 @@ -2,7 +2,7 @@ # creates NuGet package at \artifacts dotnet --version -$versionPrefix = "5.3.15" +$versionPrefix = "5.4.0" $versionSuffix = "" $versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER} $versionProduct = $versionPrefix; diff --git a/src/NLog.Extensions.Logging/Logging/NLogLoggerFactory.cs b/src/NLog.Extensions.Logging/Logging/NLogLoggerFactory.cs index 8945b24c..f0f0da8c 100644 --- a/src/NLog.Extensions.Logging/Logging/NLogLoggerFactory.cs +++ b/src/NLog.Extensions.Logging/Logging/NLogLoggerFactory.cs @@ -27,7 +27,17 @@ public NLogLoggerFactory() /// /// public NLogLoggerFactory(NLogProviderOptions options) - :this(new NLogLoggerProvider(options)) + :this(options, LogManager.LogFactory) + { + } + + /// + /// New factory with options and isolated LogFactory + /// + /// + /// + public NLogLoggerFactory(NLogProviderOptions options, LogFactory logFactory) + : this(new NLogLoggerProvider(options, logFactory)) { RegisterNLogLoggingProvider.SetupNLogConfigSettings(null, null, _provider.LogFactory); } diff --git a/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj b/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj index 9cf0cdb0..e4be1758 100644 --- a/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj +++ b/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj @@ -20,10 +20,9 @@ For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore ChangeLog: -- UseNLog allow fallback to only EnvironmentName for NLog config (#773) (@snakefoot) -- NLogMessageParameterList - Optimize the index operator (#771) (@snakefoot) -- NLogMessageParameterList - Simplify the index operator (#770) (@snakefoot) -- Recognize ITuple for better AOT support (#768) (@snakefoot) +- MicrosoftConsoleJsonLayout - TimestampLayout replaced by DateLayoutRenderer (#775) (@snakefoot) +- NLogLoggerFactory - New constructor with isolated NLog LogFactory as input parameter (#778) (@snakefoot) +- Updated to NLog v5.4 (#778) (@snakefoot) Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHANGELOG.MD @@ -86,7 +85,7 @@ List of major changes in NLog 5.0: https://nlog-project.org/2021/08/25/nlog-5-0- - +