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
This commit is contained in:
kenneth@hexad.dk
2012-06-29 19:34:06 +00:00
parent 9a32c274d9
commit cea35fc0ac
3 changed files with 33 additions and 7 deletions
+6 -4
View File
@@ -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<bool, Library.Interface.IGenericModule> 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);
}
/// <summary>
+19 -1
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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 {
}
}
/// <summary>
/// Looks up a localized string similar to An error occurred while running the backup, no files were uploaded: {0}.
/// </summary>
internal static string ErrorRunningBackup {
get {
return ResourceManager.GetString("ErrorRunningBackup", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed to find control files in: {0}.
/// </summary>
@@ -501,6 +510,15 @@ namespace Duplicati.Library.Main.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to The operation {0} has started.
/// </summary>
internal static string StartingOperationMessage {
get {
return ResourceManager.GetString("StartingOperationMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Building filelist ....
/// </summary>
@@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BadSortingDetectedError" xml:space="preserve">
<value>Bad sorting of backup times detected</value>
@@ -357,4 +357,10 @@
<data name="IncrementalBecauseThereAreNIncrementals" xml:space="preserve">
<value>An incremental backup is made because the current chain has {0} incremental backups and the full backup threshold is {1}</value>
</data>
<data name="ErrorRunningBackup" xml:space="preserve">
<value>An error occurred while running the backup, no files were uploaded: {0}</value>
</data>
<data name="StartingOperationMessage" xml:space="preserve">
<value>The operation {0} has started</value>
</data>
</root>