mirror of
https://github.com/Radarr/Radarr
synced 2025-01-01 12:54:21 +00:00
better logging in update client
This commit is contained in:
parent
a3042197c5
commit
264bb66c16
2 changed files with 7 additions and 4 deletions
|
@ -33,7 +33,7 @@ public static void Main(string[] args)
|
|||
var startupArgument = new StartupContext(args);
|
||||
NzbDroneLogger.Register(startupArgument, true, true);
|
||||
|
||||
Console.WriteLine("Starting NzbDrone Update Client");
|
||||
Logger.Info("Starting NzbDrone Update Client");
|
||||
|
||||
X509CertificateValidationPolicy.Register();
|
||||
|
||||
|
@ -41,6 +41,8 @@ public static void Main(string[] args)
|
|||
|
||||
Logger.Info("Updating NzbDrone to version {0}", BuildInfo.Version);
|
||||
_container.Resolve<UpdateApp>().Start(args);
|
||||
|
||||
Logger.Info("Update compleded successfully");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -84,17 +84,18 @@ public void Start(string installationFolder, int processId)
|
|||
_backupAndRestore.Backup(installationFolder);
|
||||
_backupAppData.Backup();
|
||||
|
||||
_logger.Info("Moving update package to target");
|
||||
|
||||
try
|
||||
{
|
||||
_logger.Info("Emptying installation folder");
|
||||
_diskProvider.EmptyFolder(installationFolder);
|
||||
|
||||
_logger.Info("Copying new files to target folder");
|
||||
_diskProvider.CopyFolder(_appFolderInfo.GetUpdatePackageFolder(), installationFolder);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_backupAndRestore.Restore(installationFolder);
|
||||
_logger.FatalException("Failed to copy upgrade package to target folder.", e);
|
||||
_backupAndRestore.Restore(installationFolder);
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
|
Loading…
Reference in a new issue