From cea35fc0ac84faa2a64d9a4cdb05bd50ec1dc87d Mon Sep 17 00:00:00 2001 From: "kenneth@hexad.dk" Date: Fri, 29 Jun 2012 19:34:06 +0000 Subject: [PATCH] Added output to the log file, even if the backend is never reached. git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1346 59da171f-624f-0410-aa54-27559c288bec --- Duplicati/Library/Main/Interface.cs | 10 ++++++---- .../Main/Strings/Interface.Designer.cs | 20 ++++++++++++++++++- Duplicati/Library/Main/Strings/Interface.resx | 10 ++++++++-- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/Duplicati/Library/Main/Interface.cs b/Duplicati/Library/Main/Interface.cs index c3d3a3cc7..df1ea3767 100644 --- a/Duplicati/Library/Main/Interface.cs +++ b/Duplicati/Library/Main/Interface.cs @@ -798,8 +798,12 @@ namespace Duplicati.Library.Main } if (backend == null || backend.ManifestUploads == 0) + { + Logging.Log.WriteMessage(string.Format(Strings.Interface.ErrorRunningBackup, ex.Message), Logging.LogMessageType.Error); throw; //This also activates "finally", unlike in other languages... + } + Logging.Log.WriteMessage(string.Format(Strings.Interface.PartialUploadMessage, backend.ManifestUploads, ex.Message), Logging.LogMessageType.Warning); bs.LogError(string.Format(Strings.Interface.PartialUploadMessage, backend.ManifestUploads, ex.Message), ex); } finally @@ -1368,10 +1372,6 @@ namespace Duplicati.Library.Main } rs.EndTime = DateTime.Now; - - //TODO: The RS should have the number of restored files, and the size of those - //but that is a little difficult, because some may be restored, and then removed - return rs.ToString(); } @@ -1910,6 +1910,8 @@ namespace Duplicati.Library.Main foreach (KeyValuePair mx in m_options.LoadedModules) if (mx.Key) mx.Value.Configure(m_options.RawOptions); + + Library.Logging.Log.WriteMessage(string.Format(Strings.Interface.StartingOperationMessage, m_options.MainAction), Logging.LogMessageType.Information); } /// diff --git a/Duplicati/Library/Main/Strings/Interface.Designer.cs b/Duplicati/Library/Main/Strings/Interface.Designer.cs index 3b3162d46..9727106b2 100644 --- a/Duplicati/Library/Main/Strings/Interface.Designer.cs +++ b/Duplicati/Library/Main/Strings/Interface.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.239 +// Runtime Version:4.0.30319.544 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -159,6 +159,15 @@ namespace Duplicati.Library.Main.Strings { } } + /// + /// Looks up a localized string similar to An error occurred while running the backup, no files were uploaded: {0}. + /// + internal static string ErrorRunningBackup { + get { + return ResourceManager.GetString("ErrorRunningBackup", resourceCulture); + } + } + /// /// Looks up a localized string similar to Failed to find control files in: {0}. /// @@ -501,6 +510,15 @@ namespace Duplicati.Library.Main.Strings { } } + /// + /// Looks up a localized string similar to The operation {0} has started. + /// + internal static string StartingOperationMessage { + get { + return ResourceManager.GetString("StartingOperationMessage", resourceCulture); + } + } + /// /// Looks up a localized string similar to Building filelist .... /// diff --git a/Duplicati/Library/Main/Strings/Interface.resx b/Duplicati/Library/Main/Strings/Interface.resx index 955c5790e..205713be4 100644 --- a/Duplicati/Library/Main/Strings/Interface.resx +++ b/Duplicati/Library/Main/Strings/Interface.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Bad sorting of backup times detected @@ -357,4 +357,10 @@ An incremental backup is made because the current chain has {0} incremental backups and the full backup threshold is {1} + + An error occurred while running the backup, no files were uploaded: {0} + + + The operation {0} has started + \ No newline at end of file