More logging during updates

pull/3113/head
Mark McDowall 12 years ago
parent a1e8266cd8
commit a2e237b926

@ -32,7 +32,6 @@ namespace NzbDrone.Common
return service != null && service.Status == ServiceControllerStatus.Running; return service != null && service.Status == ServiceControllerStatus.Running;
} }
public virtual void Install(string serviceName) public virtual void Install(string serviceName)
{ {
Logger.Info("Installing service '{0}'", serviceName); Logger.Info("Installing service '{0}'", serviceName);
@ -78,7 +77,6 @@ namespace NzbDrone.Common
Logger.Info("{0} successfully uninstalled", serviceName); Logger.Info("{0} successfully uninstalled", serviceName);
} }
public virtual void Run(ServiceBase service) public virtual void Run(ServiceBase service)
{ {
ServiceBase.Run(service); ServiceBase.Run(service);
@ -131,6 +129,7 @@ namespace NzbDrone.Common
if (service == null) if (service == null)
{ {
Logger.Warn("Unable to start '{0}' no service with that name exists.", serviceName); Logger.Warn("Unable to start '{0}' no service with that name exists.", serviceName);
return;
} }
if (service.Status != ServiceControllerStatus.Paused && service.Status != ServiceControllerStatus.Stopped) if (service.Status != ServiceControllerStatus.Paused && service.Status != ServiceControllerStatus.Stopped)

@ -42,7 +42,6 @@ namespace NzbDrone.Update
} }
TransferUpdateLogs(); TransferUpdateLogs();
} }
private static void TransferUpdateLogs() private static void TransferUpdateLogs()

@ -115,19 +115,22 @@ namespace NzbDrone.Update.Providers
_diskProvider.CopyDirectory(_environmentProvider.GetUpdateBackUpFolder(), targetFolder); _diskProvider.CopyDirectory(_environmentProvider.GetUpdateBackUpFolder(), targetFolder);
} }
private void StartNzbDrone(AppType appType, string targetFolder) private void StartNzbDrone(AppType appType, string targetFolder)
{ {
logger.Info("Starting NzbDrone");
if (appType == AppType.Service) if (appType == AppType.Service)
{ {
logger.Info("Starting NzbDrone service");
_serviceProvider.Start(ServiceProvider.NZBDRONE_SERVICE_NAME); _serviceProvider.Start(ServiceProvider.NZBDRONE_SERVICE_NAME);
} }
else if(appType == AppType.Console) else if(appType == AppType.Console)
{ {
logger.Info("Starting NzbDrone with Console");
_processProvider.Start(Path.Combine(targetFolder, "NzbDrone.Console.exe")); _processProvider.Start(Path.Combine(targetFolder, "NzbDrone.Console.exe"));
} }
else else
{ {
logger.Info("Starting NzbDrone without Console");
_processProvider.Start(Path.Combine(targetFolder, "NzbDrone.exe")); _processProvider.Start(Path.Combine(targetFolder, "NzbDrone.exe"));
} }
} }

Loading…
Cancel
Save