Merge lp:~mikemc/ubuntuone-ios-files/quiet-crashlytics into lp:ubuntuone-ios-files

Proposed by Mike McCracken
Status: Merged
Approved by: dobey
Approved revision: 101
Merged at revision: 101
Proposed branch: lp:~mikemc/ubuntuone-ios-files/quiet-crashlytics
Merge into: lp:ubuntuone-ios-files
Diff against target: 308 lines (+57/-27)
15 files modified
Files/FilesAppDelegate.m (+2/-2)
Files/U1AssetManager.m (+1/-1)
Files/U1AutoUploadOperation.m (+2/-2)
Files/U1AutoUploadsManager.m (+2/-2)
Files/U1DataRepository.m (+2/-2)
Files/U1FileDetailsViewController.m (+2/-2)
Files/U1FilesClient.m (+3/-2)
Files/U1FilesService.m (+2/-2)
Files/U1FolderViewController.m (+2/-2)
Files/U1Logging.h (+28/-0)
Files/U1SettingsViewController.m (+3/-2)
Files/U1SingleSignOnProvider.m (+2/-2)
Files/U1UploadOperation.m (+2/-2)
Files/U1UploadsPoolViewController.m (+2/-2)
Files/U1VolumesViewController.m (+2/-2)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-ios-files/quiet-crashlytics
Reviewer Review Type Date Requested Status
dobey (community) Approve
Review via email: mp+165681@code.launchpad.net

This proposal supersedes a proposal from 2013-05-20.

Commit message

- Avoid sending logs to crashlytics from debug builds.

Description of the change

- avoid sending logs to crashlytics from debug builds

Wraps Crashlytics.h with a header file that redefines CLS_LOG so we don't waste time sending log info to crashlytics servers while running debug builds. Having that extra network activity also complicates debugging.

To post a comment you must log in.
Revision history for this message
dobey (dobey) wrote : Posted in a previous version of this proposal

6 -// Copyright 2011 Canonical Ltd.
7 +// Copyright 2013 Canonical Ltd.

These should be 2011-2013, not a simple change of the year.

review: Needs Fixing
101. By Mike McCracken

Replace Crashlytics header with U1Logging.h that avoids sending logs to server when DEBUG is set

Revision history for this message
Mike McCracken (mikemc) wrote :

rev 101 is a re-application of the same changes without the crisscross merge.

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Files/FilesAppDelegate.m'
2--- Files/FilesAppDelegate.m 2013-03-29 22:44:58 +0000
3+++ Files/FilesAppDelegate.m 2013-05-24 18:29:24 +0000
4@@ -1,5 +1,5 @@
5 //
6-// Copyright 2011 Canonical Ltd.
7+// Copyright 2011-2013 Canonical Ltd.
8 //
9 // This program is free software: you can redistribute it and/or modify it
10 // under the terms of the GNU Affero General Public License version 3,
11@@ -16,7 +16,7 @@
12 #import <AssetsLibrary/ALAssetsLibrary.h>
13 #import <AssetsLibrary/ALAssetsGroup.h>
14 #import <AssetsLibrary/ALAsset.h>
15-#import <Crashlytics/Crashlytics.h>
16+#import "U1Logging.h"
17
18 #import "FilesAppDelegate.h"
19
20
21=== modified file 'Files/U1AssetManager.m'
22--- Files/U1AssetManager.m 2013-05-10 17:58:12 +0000
23+++ Files/U1AssetManager.m 2013-05-24 18:29:24 +0000
24@@ -15,7 +15,7 @@
25
26 #import "U1AssetManager.h"
27
28-#import <Crashlytics/Crashlytics.h>
29+#import "U1Logging.h"
30
31 #import "U1FolderNode.h"
32 #import "U1FileNode.h"
33
34=== modified file 'Files/U1AutoUploadOperation.m'
35--- Files/U1AutoUploadOperation.m 2013-05-20 17:56:51 +0000
36+++ Files/U1AutoUploadOperation.m 2013-05-24 18:29:24 +0000
37@@ -1,5 +1,5 @@
38 //
39-// Copyright 2013 Canonical Ltd.
40+// Copyright 2011-2013 Canonical Ltd.
41 //
42 // This program is free software: you can redistribute it and/or modify it
43 // under the terms of the GNU Affero General Public License version 3,
44@@ -15,7 +15,7 @@
45
46 #import "U1AutoUploadOperation.h"
47
48-#import <Crashlytics/Crashlytics.h>
49+#import "U1Logging.h"
50
51 #import "U1Asset.h"
52 #import "U1DataRepository.h"
53
54=== modified file 'Files/U1AutoUploadsManager.m'
55--- Files/U1AutoUploadsManager.m 2013-05-20 16:25:26 +0000
56+++ Files/U1AutoUploadsManager.m 2013-05-24 18:29:24 +0000
57@@ -1,5 +1,5 @@
58 //
59-// Copyright 2013 Canonical Ltd.
60+// Copyright 2011-2013 Canonical Ltd.
61 //
62 // This program is free software: you can redistribute it and/or modify it
63 // under the terms of the GNU Affero General Public License version 3,
64@@ -16,7 +16,7 @@
65 #import <AssetsLibrary/AssetsLibrary.h>
66 #import <MobileCoreServices/UTType.h>
67
68-#import <Crashlytics/Crashlytics.h>
69+#import "U1Logging.h"
70
71 #import "Reachability.h"
72
73
74=== modified file 'Files/U1DataRepository.m'
75--- Files/U1DataRepository.m 2013-05-10 18:01:01 +0000
76+++ Files/U1DataRepository.m 2013-05-24 18:29:24 +0000
77@@ -1,5 +1,5 @@
78 //
79-// Copyright 2011 Canonical Ltd.
80+// Copyright 2011-2013 Canonical Ltd.
81 //
82 // This program is free software: you can redistribute it and/or modify it
83 // under the terms of the GNU Affero General Public License version 3,
84@@ -17,7 +17,7 @@
85
86 #import <CoreData/CoreData.h>
87
88-#import <Crashlytics/Crashlytics.h>
89+#import "U1Logging.h"
90
91 #import "U1Node.h"
92
93
94=== modified file 'Files/U1FileDetailsViewController.m'
95--- Files/U1FileDetailsViewController.m 2013-04-11 17:12:10 +0000
96+++ Files/U1FileDetailsViewController.m 2013-05-24 18:29:24 +0000
97@@ -1,5 +1,5 @@
98 //
99-// Copyright 2011 Canonical Ltd.
100+// Copyright 2011-2013 Canonical Ltd.
101 //
102 // This program is free software: you can redistribute it and/or modify it
103 // under the terms of the GNU Affero General Public License version 3,
104@@ -15,7 +15,7 @@
105
106 #import "U1FileDetailsViewController.h"
107
108-#import <Crashlytics/Crashlytics.h>
109+#import "U1Logging.h"
110
111 #import "U1ByteSizeValueTransformer.h"
112 #import "U1FileNode.h"
113
114=== modified file 'Files/U1FilesClient.m'
115--- Files/U1FilesClient.m 2013-04-11 17:12:10 +0000
116+++ Files/U1FilesClient.m 2013-05-24 18:29:24 +0000
117@@ -1,5 +1,5 @@
118 //
119-// Copyright 2011 Canonical Ltd.
120+// Copyright 2011-2013 Canonical Ltd.
121 //
122 // This program is free software: you can redistribute it and/or modify it
123 // under the terms of the GNU Affero General Public License version 3,
124@@ -16,7 +16,8 @@
125 #import "U1FilesClient.h"
126
127 #import <CoreData/CoreData.h>
128-#import <Crashlytics/Crashlytics.h>
129+
130+#import "U1Logging.h"
131
132 #import "Reachability.h"
133
134
135=== modified file 'Files/U1FilesService.m'
136--- Files/U1FilesService.m 2013-04-04 21:18:14 +0000
137+++ Files/U1FilesService.m 2013-05-24 18:29:24 +0000
138@@ -1,5 +1,5 @@
139 //
140-// Copyright 2011 Canonical Ltd.
141+// Copyright 2011-2013 Canonical Ltd.
142 //
143 // This program is free software: you can redistribute it and/or modify it
144 // under the terms of the GNU Affero General Public License version 3,
145@@ -18,7 +18,7 @@
146 #import "OAuthConsumer.h"
147 #import "Reachability.h"
148
149-#import <Crashlytics/Crashlytics.h>
150+#import "U1Logging.h"
151
152 #import "U1AccountManager.h"
153 #import "U1FileNode.h"
154
155=== modified file 'Files/U1FolderViewController.m'
156--- Files/U1FolderViewController.m 2013-05-20 16:25:26 +0000
157+++ Files/U1FolderViewController.m 2013-05-24 18:29:24 +0000
158@@ -1,5 +1,5 @@
159 //
160-// Copyright 2013 Canonical Ltd.
161+// Copyright 2011-2013 Canonical Ltd.
162 //
163 // This program is free software: you can redistribute it and/or modify it
164 // under the terms of the GNU Affero General Public License version 3,
165@@ -20,7 +20,7 @@
166 #import <MobileCoreServices/UTType.h>
167 #import <MobileCoreServices/UTCoreTypes.h>
168
169-#import <Crashlytics/Crashlytics.h>
170+#import "U1Logging.h"
171
172 #import "U1Asset.h"
173 #import "U1AssetManager.h"
174
175=== added file 'Files/U1Logging.h'
176--- Files/U1Logging.h 1970-01-01 00:00:00 +0000
177+++ Files/U1Logging.h 2013-05-24 18:29:24 +0000
178@@ -0,0 +1,28 @@
179+//
180+// Copyright 2013 Canonical Ltd.
181+//
182+// This program is free software: you can redistribute it and/or modify it
183+// under the terms of the GNU Affero General Public License version 3,
184+// as published by the Free Software Foundation.
185+//
186+// This program is distributed in the hope that it will be useful, but
187+// WITHOUT ANY WARRANTY; without even the implied warranties of
188+// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
189+// PURPOSE. See the GNU Affero General Public License for more details.
190+//
191+// You should have received a copy of the GNU Affero General Public License
192+// along with this program. If not, see <http://www.gnu.org/licenses/>.
193+
194+
195+#ifndef Files_U1Logging_h
196+#define Files_U1Logging_h
197+
198+#import <Crashlytics/Crashlytics.h>
199+
200+// For debug builds, define CLS_LOG as just NSLog so we don't send to their server
201+#ifdef DEBUG
202+#undef CLS_LOG
203+#define CLS_LOG(__FORMAT__, ...) NSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
204+#endif
205+
206+#endif
207\ No newline at end of file
208
209=== modified file 'Files/U1SettingsViewController.m'
210--- Files/U1SettingsViewController.m 2013-04-11 16:36:34 +0000
211+++ Files/U1SettingsViewController.m 2013-05-24 18:29:24 +0000
212@@ -1,5 +1,5 @@
213 //
214-// Copyright 2011 Canonical Ltd.
215+// Copyright 2011-2013 Canonical Ltd.
216 //
217 // This program is free software: you can redistribute it and/or modify it
218 // under the terms of the GNU Affero General Public License version 3,
219@@ -15,7 +15,8 @@
220
221 #import "U1SettingsViewController.h"
222
223-#import <Crashlytics/Crashlytics.h>
224+#import "U1Logging.h"
225+
226 #import <CoreLocation/CoreLocation.h>
227 #import <QuartzCore/QuartzCore.h>
228
229
230=== modified file 'Files/U1SingleSignOnProvider.m'
231--- Files/U1SingleSignOnProvider.m 2013-04-01 16:59:18 +0000
232+++ Files/U1SingleSignOnProvider.m 2013-05-24 18:29:24 +0000
233@@ -1,5 +1,5 @@
234 //
235-// Copyright 2011 Canonical Ltd.
236+// Copyright 2011-2013 Canonical Ltd.
237 //
238 // This program is free software: you can redistribute it and/or modify it
239 // under the terms of the GNU Affero General Public License version 3,
240@@ -15,7 +15,7 @@
241
242 #import "U1SingleSignOnProvider.h"
243
244-#import <Crashlytics/Crashlytics.h>
245+#import "U1Logging.h"
246
247 #import "U1HTTPRequestOperation.h"
248 #import "U1SSOAccountResponse.h"
249
250=== modified file 'Files/U1UploadOperation.m'
251--- Files/U1UploadOperation.m 2013-04-04 21:18:14 +0000
252+++ Files/U1UploadOperation.m 2013-05-24 18:29:24 +0000
253@@ -1,5 +1,5 @@
254 //
255-// Copyright 2011 Canonical Ltd.
256+// Copyright 2011-2013 Canonical Ltd.
257 //
258 // This program is free software: you can redistribute it and/or modify it
259 // under the terms of the GNU Affero General Public License version 3,
260@@ -15,7 +15,7 @@
261
262 #import "U1UploadOperation.h"
263
264-#import <Crashlytics/Crashlytics.h>
265+#import "U1Logging.h"
266
267 #import "U1Asset.h"
268 #import "U1AssetRepresenationDataProvider.h"
269
270=== modified file 'Files/U1UploadsPoolViewController.m'
271--- Files/U1UploadsPoolViewController.m 2013-04-03 22:51:14 +0000
272+++ Files/U1UploadsPoolViewController.m 2013-05-24 18:29:24 +0000
273@@ -1,5 +1,5 @@
274 //
275-// Copyright 2011 Canonical Ltd.
276+// Copyright 2011-2013 Canonical Ltd.
277 //
278 // This program is free software: you can redistribute it and/or modify it
279 // under the terms of the GNU Affero General Public License version 3,
280@@ -15,7 +15,7 @@
281
282 #import "U1UploadsPoolViewController.h"
283
284-#import <Crashlytics/Crashlytics.h>
285+#import "U1Logging.h"
286
287 #import "U1FileNode.h"
288 #import "U1FileDetailsViewController.h"
289
290=== modified file 'Files/U1VolumesViewController.m'
291--- Files/U1VolumesViewController.m 2013-04-10 21:26:22 +0000
292+++ Files/U1VolumesViewController.m 2013-05-24 18:29:24 +0000
293@@ -1,5 +1,5 @@
294 //
295-// Copyright 2011 Canonical Ltd.
296+// Copyright 2011-2013 Canonical Ltd.
297 //
298 // This program is free software: you can redistribute it and/or modify it
299 // under the terms of the GNU Affero General Public License version 3,
300@@ -15,7 +15,7 @@
301
302 #import "U1VolumesViewController.h"
303
304-#import <Crashlytics/Crashlytics.h>
305+#import "U1Logging.h"
306
307 #import "U1FilesClient.h"
308 #import "U1FileDetailsViewController.h"

Subscribers

People subscribed via source and target branches