From 9b42dc70826796831e789a3b812577b11eee05be Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Tue, 22 Mar 2016 00:10:27 +0100 Subject: [PATCH] Reconfigure Logging early in the process to set the correct log level. --- src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs | 8 +------- src/NzbDrone.Host/Bootstrap.cs | 3 +++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs b/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs index 391c22894..a951b952b 100644 --- a/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs +++ b/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs @@ -11,8 +11,7 @@ namespace NzbDrone.Core.Instrumentation { - public class ReconfigureLogging : IHandleAsync, - IHandle + public class ReconfigureLogging : IHandleAsync { private readonly IConfigFileProvider _configFileProvider; @@ -79,10 +78,5 @@ public void HandleAsync(ConfigFileSavedEvent message) { Reconfigure(); } - - public void Handle(ApplicationStartedEvent message) - { - Reconfigure(); - } } } diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs index 066b38d60..392478458 100644 --- a/src/NzbDrone.Host/Bootstrap.cs +++ b/src/NzbDrone.Host/Bootstrap.cs @@ -8,6 +8,7 @@ using NzbDrone.Common.Processes; using NzbDrone.Common.Security; using NzbDrone.Core.Datastore; +using NzbDrone.Core.Instrumentation; namespace NzbDrone.Host { @@ -56,6 +57,8 @@ public static void Start(StartupContext startupContext, IUserAlert userAlert, Ac private static void Start(ApplicationModes applicationModes, StartupContext startupContext) { + _container.Resolve().Reconfigure(); + if (!IsInUtilityMode(applicationModes)) { if (startupContext.Flags.Contains(StartupContext.RESTART))