diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index a26dd842a..a926a45d4 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -109,7 +109,7 @@
-
+
diff --git a/src/NzbDrone.Common/Prowlarr.Common.csproj b/src/NzbDrone.Common/Prowlarr.Common.csproj
index e5475de4e..4cbb90d63 100644
--- a/src/NzbDrone.Common/Prowlarr.Common.csproj
+++ b/src/NzbDrone.Common/Prowlarr.Common.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs
index 971d939d4..e33cebc4d 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/Prowlarr.Core.csproj b/src/NzbDrone.Core/Prowlarr.Core.csproj
index 4632eb940..66b260791 100644
--- a/src/NzbDrone.Core/Prowlarr.Core.csproj
+++ b/src/NzbDrone.Core/Prowlarr.Core.csproj
@@ -17,7 +17,7 @@
-
+
diff --git a/src/NzbDrone.Host/Prowlarr.Host.csproj b/src/NzbDrone.Host/Prowlarr.Host.csproj
index 026e521c6..7d6846b56 100644
--- a/src/NzbDrone.Host/Prowlarr.Host.csproj
+++ b/src/NzbDrone.Host/Prowlarr.Host.csproj
@@ -4,7 +4,7 @@
Library
-
+
diff --git a/src/NzbDrone.Test.Common/Prowlarr.Test.Common.csproj b/src/NzbDrone.Test.Common/Prowlarr.Test.Common.csproj
index 5ed567e15..87e84af7d 100644
--- a/src/NzbDrone.Test.Common/Prowlarr.Test.Common.csproj
+++ b/src/NzbDrone.Test.Common/Prowlarr.Test.Common.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/src/NzbDrone.Update/Prowlarr.Update.csproj b/src/NzbDrone.Update/Prowlarr.Update.csproj
index 909d94853..aefe37fed 100644
--- a/src/NzbDrone.Update/Prowlarr.Update.csproj
+++ b/src/NzbDrone.Update/Prowlarr.Update.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/src/NzbDrone.Windows/Prowlarr.Windows.csproj b/src/NzbDrone.Windows/Prowlarr.Windows.csproj
index f690fcf0f..e4407e1cd 100644
--- a/src/NzbDrone.Windows/Prowlarr.Windows.csproj
+++ b/src/NzbDrone.Windows/Prowlarr.Windows.csproj
@@ -4,7 +4,7 @@
true
-
+
diff --git a/src/Prowlarr.Api.V1/Prowlarr.Api.V1.csproj b/src/Prowlarr.Api.V1/Prowlarr.Api.V1.csproj
index 55b761157..49878d538 100644
--- a/src/Prowlarr.Api.V1/Prowlarr.Api.V1.csproj
+++ b/src/Prowlarr.Api.V1/Prowlarr.Api.V1.csproj
@@ -4,7 +4,7 @@
-
+
diff --git a/src/Prowlarr.Http/Prowlarr.Http.csproj b/src/Prowlarr.Http/Prowlarr.Http.csproj
index 9d9bcbb95..39bf131f8 100644
--- a/src/Prowlarr.Http/Prowlarr.Http.csproj
+++ b/src/Prowlarr.Http/Prowlarr.Http.csproj
@@ -5,7 +5,7 @@
-
+