Merge lp:~mandel/ubuntuone-windows-installer/improve_logging into lp:ubuntuone-windows-installer/beta

Proposed by Manuel de la Peña
Status: Merged
Merged at revision: 116
Proposed branch: lp:~mandel/ubuntuone-windows-installer/improve_logging
Merge into: lp:ubuntuone-windows-installer/beta
Prerequisite: lp:~mandel/ubuntuone-windows-installer/remove_rubish
Diff against target: 45 lines (+7/-4)
2 files modified
src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonService.cs (+7/-3)
src/u1sync/sync.py (+0/-1)
To merge this branch: bzr merge lp:~mandel/ubuntuone-windows-installer/improve_logging
Reviewer Review Type Date Requested Status
Ubuntu One hackers Pending
Review via email: mp+38842@code.launchpad.net

Description of the change

Improves the logging by redirecting the stdout and stderr of u1sync.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonService.cs'
2--- src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonService.cs 2010-10-19 14:31:19 +0000
3+++ src/Canonical.UbuntuOne.ProcessDispatcher/SyncDaemonService.cs 2010-10-19 14:31:20 +0000
4@@ -411,7 +411,7 @@
5 UseShellExecute = false,
6 RedirectStandardOutput = true,
7 RedirectStandardError = true,
8- CreateNoWindow = false
9+ CreateNoWindow = true
10
11 }
12 };
13@@ -431,14 +431,18 @@
14 FileName = Path.Combine(u1SyncPath, "main.exe"),
15 Arguments = String.Format("\"{0}\" --oauth {1}", path, tokens),
16 UseShellExecute = false,
17- RedirectStandardOutput = false,
18- RedirectStandardError = false,
19+ RedirectStandardOutput = true,
20+ RedirectStandardError = true,
21 CreateNoWindow = true
22 }
23 };
24 sync.Start();
25 // we wait, we are in a diff thread in a diff process this will not block the user UI
26 sync.WaitForExit();
27+ var std_out = sync.StandardOutput.ReadToEnd();
28+ var std_err = sync.StandardError.ReadToEnd();
29+ Logger.InfoFormat("StandarOutput from u1sync is: {0}", sync.StandardOutput.ReadToEnd());
30+ Logger.ErrorFormat("StandardError from u1sync is: {0}", sync.StandardError.ReadToEnd());
31 sync.Close();
32 IsManualSyncRunning = false;
33 }
34
35=== modified file 'src/u1sync/sync.py'
36--- src/u1sync/sync.py 2010-10-19 14:31:19 +0000
37+++ src/u1sync/sync.py 2010-10-19 14:31:20 +0000
38@@ -92,7 +92,6 @@
39 send_notification("Downloading", "Downloading file '%s'" % display_path, "info")
40 elif(sync_mode.symbol == UPLOAD_SYMBOL):
41 send_notification("Uploading", "Uploading file '%s'" % display_path, "info")
42- send_notification()
43 try:
44 create_dir = sync_mode.create_directory
45 node_uuid = create_dir(parent_uuid=parent_uuid,

Subscribers

People subscribed via source and target branches

to all changes: