1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-25 09:12:17 +00:00

More logging during updates

This commit is contained in:
Mark McDowall 2013-01-14 13:14:32 -08:00
parent a1e8266cd8
commit a2e237b926
3 changed files with 5 additions and 4 deletions

View file

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

View file

@ -42,7 +42,6 @@ public static void Main(string[] args)
}
TransferUpdateLogs();
}
private static void TransferUpdateLogs()

View file

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