diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 49ac70fce8..7a90b653a9 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 9928c9e3ff..15f0d8ec78 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 02cb582311..16b025fa79 100644
--- a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs
+++ b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs
@@ -33,22 +33,25 @@ public void Register()
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 c1de3e918d..e6b36db089 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 dc0a665ec1..20f58ba438 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 0359841165..5fb9320d61 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 4cc5baca4c..71a883e068 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 7bbd913774..dda638a202 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 56ac3996d9..37a6c16f30 100644
--- a/src/Radarr.Http/Radarr.Http.csproj
+++ b/src/Radarr.Http/Radarr.Http.csproj
@@ -5,7 +5,7 @@
-
+