Log when running tray app

pull/6/head
Qstick 7 years ago
parent 30a3348ba8
commit b7fab7db0c

@ -8,6 +8,7 @@ namespace NzbDrone.Common.EnvironmentInfo
bool IsUserInteractive { get; } bool IsUserInteractive { get; }
bool IsAdmin { get; } bool IsAdmin { get; }
bool IsWindowsService { get; } bool IsWindowsService { get; }
bool IsWindowsTray { get; }
bool IsExiting { get; set; } bool IsExiting { get; set; }
bool IsTray { get; } bool IsTray { get; }
RuntimeMode Mode { get; } RuntimeMode Mode { get; }

@ -13,18 +13,21 @@ namespace NzbDrone.Host
private readonly INzbDroneServiceFactory _nzbDroneServiceFactory; private readonly INzbDroneServiceFactory _nzbDroneServiceFactory;
private readonly IServiceProvider _serviceProvider; private readonly IServiceProvider _serviceProvider;
private readonly IConsoleService _consoleService; private readonly IConsoleService _consoleService;
private readonly IRuntimeInfo _runtimeInfo;
private readonly IProcessProvider _processProvider; private readonly IProcessProvider _processProvider;
private readonly Logger _logger; private readonly Logger _logger;
public Router(INzbDroneServiceFactory nzbDroneServiceFactory, public Router(INzbDroneServiceFactory nzbDroneServiceFactory,
IServiceProvider serviceProvider, IServiceProvider serviceProvider,
IConsoleService consoleService, IConsoleService consoleService,
IRuntimeInfo runtimeInfo,
IProcessProvider processProvider, IProcessProvider processProvider,
Logger logger) Logger logger)
{ {
_nzbDroneServiceFactory = nzbDroneServiceFactory; _nzbDroneServiceFactory = nzbDroneServiceFactory;
_serviceProvider = serviceProvider; _serviceProvider = serviceProvider;
_consoleService = consoleService; _consoleService = consoleService;
_runtimeInfo = runtimeInfo;
_processProvider = processProvider; _processProvider = processProvider;
_logger = logger; _logger = logger;
} }
@ -44,7 +47,7 @@ namespace NzbDrone.Host
case ApplicationModes.Interactive: case ApplicationModes.Interactive:
{ {
_logger.Debug("Console selected"); _logger.Debug(_runtimeInfo.IsWindowsTray ? "Tray selected" : "Console selected");
_nzbDroneServiceFactory.Start(); _nzbDroneServiceFactory.Start();
break; break;
} }

Loading…
Cancel
Save