From d47d264d6e9c01a8033df6822e683ce45cdafb11 Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Sun, 27 Nov 2022 09:43:01 +0100 Subject: [PATCH] Version 5.2.0 --- CHANGELOG.MD | 13 +++++++++++++ build.ps1 | 2 +- .../Extensions/ConfigureExtensions.cs | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 33d5fe23..09ec801c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -2,6 +2,19 @@ Date format: (year/month/day) +### Version 5.2.0 (2022/11/27) + +**Improvements** +- [#645](https://github.com/NLog/NLog.Extensions.Logging/pull/645): Updated to NLog 5.1 with support for ISpanFormattable (@snakefoot) +- [#646](https://github.com/NLog/NLog.Extensions.Logging/pull/646): Use CallerArgumentExpressionAttribute in helper method for throwing ArgumentNullException (@snakefoot) +- [#639](https://github.com/NLog/NLog.Extensions.Logging/pull/639): NLogBeginScopeParser - CaptureScopeProperties with cached scopePropertyCount (@snakefoot) +- [#638](https://github.com/NLog/NLog.Extensions.Logging/pull/638): NLogMessageParameterList - Skip parsing Parameters-array when simple positional message template (@snakefoot) +- [#635](https://github.com/NLog/NLog.Extensions.Logging/pull/635): Improve XML docs for AddNLog with IConfiguration override (@snakefoot) +- [#634](https://github.com/NLog/NLog.Extensions.Logging/pull/634): NLogLogger - Small optimization when message-template syntax is used (@snakefoot) +- [#632](https://github.com/NLog/NLog.Extensions.Logging/pull/632): Use RegisterConfigSettings instead of ConfigSettingLayoutRenderer (@snakefoot) +- [#632](https://github.com/NLog/NLog.Extensions.Logging/pull/632): LoadConfigurationFromSection should RegisterConfigSettings without configuration assign (@snakefoot) +- [#631](https://github.com/NLog/NLog.Extensions.Logging/pull/631): NLog.Extensions.Hosting - Skip RegisterItemsFromAssembly since handled by RegisterConfigSettings (@snakefoot) + ### Version 5.1.0 (2022/10/26) **Improvements** diff --git a/build.ps1 b/build.ps1 index 3f96073b..ea0234ad 100644 --- a/build.ps1 +++ b/build.ps1 @@ -2,7 +2,7 @@ # creates NuGet package at \artifacts dotnet --version -$versionPrefix = "5.1.0" +$versionPrefix = "5.2.0" $versionSuffix = "" $versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER} $versionProduct = $versionPrefix; diff --git a/src/NLog.Extensions.Hosting/Extensions/ConfigureExtensions.cs b/src/NLog.Extensions.Hosting/Extensions/ConfigureExtensions.cs index 62d23eda..9d11f4ba 100644 --- a/src/NLog.Extensions.Hosting/Extensions/ConfigureExtensions.cs +++ b/src/NLog.Extensions.Hosting/Extensions/ConfigureExtensions.cs @@ -48,6 +48,7 @@ public static IHostBuilder UseNLog(this IHostBuilder builder, NLogProviderOption private static void AddNLogLoggerProvider(IServiceCollection services, IConfiguration hostConfiguration, IHostEnvironment hostEnvironment, NLogProviderOptions options, Func factory) { + LogManager.AddHiddenAssembly(typeof(ConfigureExtensions).GetTypeInfo().Assembly); services.TryAddNLogLoggingProvider((svc, addlogging) => svc.AddLogging(addlogging), hostConfiguration, options, (provider, cfg, opt) => factory(provider, cfg, hostEnvironment, opt)); }