From a471f1b44f51fa245caae4bb853a3ef45e80e541 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 31 May 2023 07:12:56 +0300 Subject: [PATCH] Bump NLog to 5.2.0 --- src/Directory.Build.props | 2 +- src/NzbDrone.Common/Radarr.Common.csproj | 4 ++-- src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs | 11 +++++++---- src/NzbDrone.Core/Radarr.Core.csproj | 2 +- src/NzbDrone.Test.Common/Radarr.Test.Common.csproj | 2 +- src/NzbDrone.Update/Radarr.Update.csproj | 2 +- src/NzbDrone.Windows/Radarr.Windows.csproj | 2 +- src/Radarr.Api.V3/Radarr.Api.V3.csproj | 2 +- src/Radarr.Http/Radarr.Http.csproj | 2 +- 9 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 49ac70fce..7a90b653a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -104,7 +104,7 @@ - + diff --git a/src/NzbDrone.Common/Radarr.Common.csproj b/src/NzbDrone.Common/Radarr.Common.csproj index 9928c9e3f..15f0d8ec7 100644 --- a/src/NzbDrone.Common/Radarr.Common.csproj +++ b/src/NzbDrone.Common/Radarr.Common.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs index 02cb58231..16b025fa7 100644 --- a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs +++ b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs @@ -33,22 +33,25 @@ namespace NzbDrone.Core.Instrumentation LogManager.Configuration.AddTarget("DbLogger", target); LogManager.Configuration.LoggingRules.Add(Rule); - LogManager.ConfigurationReloaded += OnLogManagerOnConfigurationReloaded; + LogManager.ConfigurationChanged += OnLogManagerOnConfigurationChanged; LogManager.ReconfigExistingLoggers(); } public void UnRegister() { - LogManager.ConfigurationReloaded -= OnLogManagerOnConfigurationReloaded; + LogManager.ConfigurationChanged -= OnLogManagerOnConfigurationChanged; LogManager.Configuration.RemoveTarget("DbLogger"); LogManager.Configuration.LoggingRules.Remove(Rule); LogManager.ReconfigExistingLoggers(); Dispose(); } - private void OnLogManagerOnConfigurationReloaded(object sender, LoggingConfigurationReloadedEventArgs args) + private void OnLogManagerOnConfigurationChanged(object sender, LoggingConfigurationChangedEventArgs args) { - Register(); + if (args.ActivatedConfiguration != null) + { + Register(); + } } public LoggingRule Rule { get; set; } diff --git a/src/NzbDrone.Core/Radarr.Core.csproj b/src/NzbDrone.Core/Radarr.Core.csproj index c1de3e918..e6b36db08 100644 --- a/src/NzbDrone.Core/Radarr.Core.csproj +++ b/src/NzbDrone.Core/Radarr.Core.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/NzbDrone.Test.Common/Radarr.Test.Common.csproj b/src/NzbDrone.Test.Common/Radarr.Test.Common.csproj index dc0a665ec..20f58ba43 100644 --- a/src/NzbDrone.Test.Common/Radarr.Test.Common.csproj +++ b/src/NzbDrone.Test.Common/Radarr.Test.Common.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/NzbDrone.Update/Radarr.Update.csproj b/src/NzbDrone.Update/Radarr.Update.csproj index 035984116..5fb9320d6 100644 --- a/src/NzbDrone.Update/Radarr.Update.csproj +++ b/src/NzbDrone.Update/Radarr.Update.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/NzbDrone.Windows/Radarr.Windows.csproj b/src/NzbDrone.Windows/Radarr.Windows.csproj index 4cc5baca4..71a883e06 100644 --- a/src/NzbDrone.Windows/Radarr.Windows.csproj +++ b/src/NzbDrone.Windows/Radarr.Windows.csproj @@ -4,7 +4,7 @@ true - + diff --git a/src/Radarr.Api.V3/Radarr.Api.V3.csproj b/src/Radarr.Api.V3/Radarr.Api.V3.csproj index 7bbd91377..dda638a20 100644 --- a/src/Radarr.Api.V3/Radarr.Api.V3.csproj +++ b/src/Radarr.Api.V3/Radarr.Api.V3.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Radarr.Http/Radarr.Http.csproj b/src/Radarr.Http/Radarr.Http.csproj index 56ac3996d..37a6c16f3 100644 --- a/src/Radarr.Http/Radarr.Http.csproj +++ b/src/Radarr.Http/Radarr.Http.csproj @@ -5,7 +5,7 @@ - +