mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Reconfigure Logging early in the process to set the correct log level.
This commit is contained in:
@@ -11,8 +11,7 @@ using NzbDrone.Core.Messaging.Events;
|
||||
|
||||
namespace NzbDrone.Core.Instrumentation
|
||||
{
|
||||
public class ReconfigureLogging : IHandleAsync<ConfigFileSavedEvent>,
|
||||
IHandle<ApplicationStartedEvent>
|
||||
public class ReconfigureLogging : IHandleAsync<ConfigFileSavedEvent>
|
||||
{
|
||||
private readonly IConfigFileProvider _configFileProvider;
|
||||
|
||||
@@ -79,10 +78,5 @@ namespace NzbDrone.Core.Instrumentation
|
||||
{
|
||||
Reconfigure();
|
||||
}
|
||||
|
||||
public void Handle(ApplicationStartedEvent message)
|
||||
{
|
||||
Reconfigure();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using NzbDrone.Common.Instrumentation;
|
||||
using NzbDrone.Common.Processes;
|
||||
using NzbDrone.Common.Security;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Instrumentation;
|
||||
|
||||
namespace NzbDrone.Host
|
||||
{
|
||||
@@ -56,6 +57,8 @@ namespace NzbDrone.Host
|
||||
|
||||
private static void Start(ApplicationModes applicationModes, StartupContext startupContext)
|
||||
{
|
||||
_container.Resolve<ReconfigureLogging>().Reconfigure();
|
||||
|
||||
if (!IsInUtilityMode(applicationModes))
|
||||
{
|
||||
if (startupContext.Flags.Contains(StartupContext.RESTART))
|
||||
|
||||
Reference in New Issue
Block a user