Skip to content

Commit 78ee63d

Browse files
authored
Handle events that fail to write or are missing and add logging levels (#5357)
* Change removeItemAtURL to removeItemAtPath It seems to work better, for reasons that aren't clear. It may have something to do with forming URLs being more strict. * Add logging levels, fix failed write events * Update comment
1 parent f1e58ae commit 78ee63d

18 files changed

+135
-101
lines changed

GoogleDataTransport/GDTCORLibrary/GDTCORConsoleLogger.m

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,34 @@
1616

1717
#import "GDTCORLibrary/Public/GDTCORConsoleLogger.h"
1818

19+
volatile NSInteger GDTCORConsoleLoggerLoggingLevel = GDTCORLoggingLevelErrors;
20+
1921
/** The console logger prefix. */
2022
static NSString *kGDTCORConsoleLogger = @"[GoogleDataTransport]";
2123

2224
NSString *GDTCORMessageCodeEnumToString(GDTCORMessageCode code) {
2325
return [[NSString alloc] initWithFormat:@"I-GDTCOR%06ld", (long)code];
2426
}
2527

26-
void GDTCORLog(GDTCORMessageCode code, NSString *format, ...) {
28+
void GDTCORLog(GDTCORMessageCode code, GDTCORLoggingLevel logLevel, NSString *format, ...) {
2729
// Don't log anything in not debug builds.
2830
#if !NDEBUG
29-
NSString *logFormat = [NSString stringWithFormat:@"%@[%@] %@", kGDTCORConsoleLogger,
30-
GDTCORMessageCodeEnumToString(code), format];
31-
va_list args;
32-
va_start(args, format);
33-
NSLogv(logFormat, args);
34-
va_end(args);
31+
if (logLevel >= GDTCORConsoleLoggerLoggingLevel) {
32+
NSString *logFormat = [NSString stringWithFormat:@"%@[%@] %@", kGDTCORConsoleLogger,
33+
GDTCORMessageCodeEnumToString(code), format];
34+
va_list args;
35+
va_start(args, format);
36+
NSLogv(logFormat, args);
37+
va_end(args);
38+
}
3539
#endif // !NDEBUG
3640
}
3741

3842
void GDTCORLogAssert(
3943
BOOL wasFatal, NSString *_Nonnull file, NSInteger line, NSString *_Nullable format, ...) {
40-
GDTCORMessageCode code = wasFatal ? GDTCORMCEFatalAssertion : GDTCORMCEGeneralError;
4144
// Don't log anything in not debug builds.
4245
#if !NDEBUG
46+
GDTCORMessageCode code = wasFatal ? GDTCORMCEFatalAssertion : GDTCORMCEGeneralError;
4347
NSString *logFormat =
4448
[NSString stringWithFormat:@"%@[%@] (%@:%ld) : %@", kGDTCORConsoleLogger,
4549
GDTCORMessageCodeEnumToString(code), file, (long)line, format];

GoogleDataTransport/GDTCORLibrary/GDTCOREvent.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ - (nullable instancetype)initWithMappingID:(NSString *)mappingID target:(NSInteg
7474
_target = target;
7575
_qosTier = GDTCOREventQosDefault;
7676
}
77-
GDTCORLogDebug("Event %@ created. mappingID: %@ target:%ld", self, mappingID, (long)target);
77+
GDTCORLogDebug(@"Event %@ created. mappingID: %@ target:%ld", self, mappingID, (long)target);
7878
return self;
7979
}
8080

@@ -86,7 +86,7 @@ - (instancetype)copy {
8686
copy.clockSnapshot = _clockSnapshot;
8787
copy.customBytes = _customBytes;
8888
copy->_GDTFilePath = _GDTFilePath;
89-
GDTCORLogDebug("Copying event %@ to event %@", self, copy);
89+
GDTCORLogDebug(@"Copying event %@ to event %@", self, copy);
9090
return copy;
9191
}
9292

GoogleDataTransport/GDTCORLibrary/GDTCORFlatFileStorage.m

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ - (instancetype)init {
7474

7575
- (void)storeEvent:(GDTCOREvent *)event
7676
onComplete:(void (^_Nullable)(BOOL wasWritten, NSError *_Nullable error))completion {
77-
GDTCORLogDebug("Saving event: %@", event);
77+
GDTCORLogDebug(@"Saving event: %@", event);
7878
if (event == nil) {
79-
GDTCORLogDebug("%@", @"The event was nil, so it was not saved.");
79+
GDTCORLogDebug(@"%@", @"The event was nil, so it was not saved.");
8080
return;
8181
}
8282
BOOL hadOriginalCompletion = completion != nil;
@@ -113,10 +113,12 @@ - (void)storeEvent:(GDTCOREvent *)event
113113
NSURL *eventFile = [self saveEventBytesToDisk:event eventHash:event.hash error:&error];
114114
if (!eventFile || error) {
115115
GDTCORLogError(GDTCORMCEFileWriteError, @"Event failed to save to disk: %@", error);
116+
completion(NO, error);
117+
return;
116118
} else {
117-
GDTCORLogDebug("Event saved to disk: %@", eventFile);
119+
GDTCORLogDebug(@"Event saved to disk: %@", eventFile);
120+
completion(YES, error);
118121
}
119-
completion(eventFile != nil, error);
120122

121123
// Add event to tracking collections.
122124
[self addEventToTrackingCollections:event];
@@ -137,11 +139,11 @@ - (void)storeEvent:(GDTCOREvent *)event
137139
// Write state to disk if there was an onComplete block or if we're in the background.
138140
if (hadOriginalCompletion || [[GDTCORApplication sharedApplication] isRunningInBackground]) {
139141
if (hadOriginalCompletion) {
140-
GDTCORLogDebug("%@",
142+
GDTCORLogDebug(@"%@",
141143
@"Saving flat file storage state because a completion block was passed.");
142144
} else {
143145
GDTCORLogDebug(
144-
"%@", @"Saving flat file storage state because the app is running in the background");
146+
@"%@", @"Saving flat file storage state because the app is running in the background");
145147
}
146148
NSError *error;
147149
GDTCOREncodeArchive(self, [GDTCORFlatFileStorage archivePath], &error);
@@ -153,7 +155,7 @@ - (void)storeEvent:(GDTCOREvent *)event
153155
// Cancel or end the associated background task if it's still valid.
154156
[[GDTCORApplication sharedApplication] endBackgroundTask:bgID];
155157
bgID = GDTCORBackgroundIdentifierInvalid;
156-
GDTCORLogDebug("Event %@ is stored. There are %ld events stored on disk", event,
158+
GDTCORLogDebug(@"Event %@ is stored. There are %ld events stored on disk", event,
157159
(unsigned long)self->_storedEvents.count);
158160
});
159161
}
@@ -168,9 +170,13 @@ - (void)removeEvents:(NSSet<NSNumber *> *)eventIDs {
168170
NSError *error;
169171
if (event.fileURL) {
170172
NSURL *fileURL = event.fileURL;
171-
[[NSFileManager defaultManager] removeItemAtURL:fileURL error:&error];
172-
GDTCORAssert(error == nil, @"There was an error removing an event file: %@", error);
173-
GDTCORLogDebug("Removed event from disk: %@", fileURL);
173+
BOOL result = [[NSFileManager defaultManager] removeItemAtPath:fileURL.path error:&error];
174+
if (!result || error) {
175+
GDTCORLogWarning(GDTCORMCWFileReadError,
176+
@"There was an error removing an event file: %@", error);
177+
} else {
178+
GDTCORLogDebug(@"Removed event from disk: %@", fileURL);
179+
}
174180
}
175181

176182
// Remove from the tracking collections.

GoogleDataTransport/GDTCORLibrary/GDTCORLifecycle.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,47 +71,47 @@ - (void)dealloc {
7171
- (void)applicationDidEnterBackground:(NSNotification *)notification {
7272
GDTCORApplication *application = [GDTCORApplication sharedApplication];
7373
if ([[GDTCORTransformer sharedInstance] respondsToSelector:@selector(appWillBackground:)]) {
74-
GDTCORLogDebug("%@", @"Signaling GDTCORTransformer that the app is backgrounding.");
74+
GDTCORLogDebug(@"%@", @"Signaling GDTCORTransformer that the app is backgrounding.");
7575
[[GDTCORTransformer sharedInstance] appWillBackground:application];
7676
}
7777
if ([[GDTCORUploadCoordinator sharedInstance] respondsToSelector:@selector(appWillBackground:)]) {
78-
GDTCORLogDebug("%@", @"Signaling GDTCORUploadCoordinator that the app is backgrounding.");
78+
GDTCORLogDebug(@"%@", @"Signaling GDTCORUploadCoordinator that the app is backgrounding.");
7979
[[GDTCORUploadCoordinator sharedInstance] appWillBackground:application];
8080
}
8181
if ([[GDTCORRegistrar sharedInstance] respondsToSelector:@selector(appWillBackground:)]) {
82-
GDTCORLogDebug("%@", @"Signaling GDTCORRegistrar that the app is backgrounding.");
82+
GDTCORLogDebug(@"%@", @"Signaling GDTCORRegistrar that the app is backgrounding.");
8383
[[GDTCORRegistrar sharedInstance] appWillBackground:application];
8484
}
8585
}
8686

8787
- (void)applicationWillEnterForeground:(NSNotification *)notification {
8888
GDTCORApplication *application = [GDTCORApplication sharedApplication];
8989
if ([[GDTCORTransformer sharedInstance] respondsToSelector:@selector(appWillForeground:)]) {
90-
GDTCORLogDebug("%@", @"Signaling GDTCORTransformer that the app is foregrounding.");
90+
GDTCORLogDebug(@"%@", @"Signaling GDTCORTransformer that the app is foregrounding.");
9191
[[GDTCORTransformer sharedInstance] appWillForeground:application];
9292
}
9393
if ([[GDTCORUploadCoordinator sharedInstance] respondsToSelector:@selector(appWillForeground:)]) {
94-
GDTCORLogDebug("%@", @"Signaling GDTCORUploadCoordinator that the app is foregrounding.");
94+
GDTCORLogDebug(@"%@", @"Signaling GDTCORUploadCoordinator that the app is foregrounding.");
9595
[[GDTCORUploadCoordinator sharedInstance] appWillForeground:application];
9696
}
9797
if ([[GDTCORRegistrar sharedInstance] respondsToSelector:@selector(appWillForeground:)]) {
98-
GDTCORLogDebug("%@", @"Signaling GDTCORRegistrar that the app is foregrounding.");
98+
GDTCORLogDebug(@"%@", @"Signaling GDTCORRegistrar that the app is foregrounding.");
9999
[[GDTCORRegistrar sharedInstance] appWillForeground:application];
100100
}
101101
}
102102

103103
- (void)applicationWillTerminate:(NSNotification *)notification {
104104
GDTCORApplication *application = [GDTCORApplication sharedApplication];
105105
if ([[GDTCORTransformer sharedInstance] respondsToSelector:@selector(appWillTerminate:)]) {
106-
GDTCORLogDebug("%@", @"Signaling GDTCORTransformer that the app is terminating.");
106+
GDTCORLogDebug(@"%@", @"Signaling GDTCORTransformer that the app is terminating.");
107107
[[GDTCORTransformer sharedInstance] appWillTerminate:application];
108108
}
109109
if ([[GDTCORUploadCoordinator sharedInstance] respondsToSelector:@selector(appWillTerminate:)]) {
110-
GDTCORLogDebug("%@", @"Signaling GDTCORUploadCoordinator that the app is terminating.");
110+
GDTCORLogDebug(@"%@", @"Signaling GDTCORUploadCoordinator that the app is terminating.");
111111
[[GDTCORUploadCoordinator sharedInstance] appWillTerminate:application];
112112
}
113113
if ([[GDTCORRegistrar sharedInstance] respondsToSelector:@selector(appWillTerminate:)]) {
114-
GDTCORLogDebug("%@", @"Signaling GDTCORRegistrar that the app is terminating.");
114+
GDTCORLogDebug(@"%@", @"Signaling GDTCORRegistrar that the app is terminating.");
115115
[[GDTCORRegistrar sharedInstance] appWillTerminate:application];
116116
}
117117
}

GoogleDataTransport/GDTCORLibrary/GDTCORPlatform.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0];
5050
GDTPath =
5151
[NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/google-sdks-events", cachePath]];
52-
GDTCORLogDebug("GDT's state will be saved to: %@", GDTPath);
52+
GDTCORLogDebug(@"GDT's state will be saved to: %@", GDTPath);
5353
if (![[NSFileManager defaultManager] fileExistsAtPath:GDTPath.path]) {
5454
NSError *error;
5555
[[NSFileManager defaultManager] createDirectoryAtPath:GDTPath.path
@@ -247,9 +247,9 @@ @implementation GDTCORApplication
247247

248248
+ (void)load {
249249
GDTCORLogDebug(
250-
"%@", @"GDT is initializing. Please note that if you quit the app via the "
251-
"debugger and not through a lifecycle event, event data will remain on disk but "
252-
"storage won't have a reference to them since the singleton wasn't saved to disk.");
250+
@"%@", @"GDT is initializing. Please note that if you quit the app via the "
251+
"debugger and not through a lifecycle event, event data will remain on disk but "
252+
"storage won't have a reference to them since the singleton wasn't saved to disk.");
253253
#if TARGET_OS_IOS || TARGET_OS_TV
254254
// If this asserts, please file a bug at https://github.com/firebase/firebase-ios-sdk/issues.
255255
GDTCORFatalAssert(
@@ -322,15 +322,15 @@ - (GDTCORBackgroundIdentifier)beginBackgroundTaskWithName:(NSString *)name
322322
expirationHandler:handler];
323323
#if !NDEBUG
324324
if (bgID != GDTCORBackgroundIdentifierInvalid) {
325-
GDTCORLogDebug("Creating background task with name:%@ bgID:%ld", name, (long)bgID);
325+
GDTCORLogDebug(@"Creating background task with name:%@ bgID:%ld", name, (long)bgID);
326326
}
327327
#endif // !NDEBUG
328328
return bgID;
329329
}
330330

331331
- (void)endBackgroundTask:(GDTCORBackgroundIdentifier)bgID {
332332
if (bgID != GDTCORBackgroundIdentifierInvalid) {
333-
GDTCORLogDebug("Ending background task with ID:%ld was successful", (long)bgID);
333+
GDTCORLogDebug(@"Ending background task with ID:%ld was successful", (long)bgID);
334334
[[self sharedApplicationForBackgroundTask] endBackgroundTask:bgID];
335335
return;
336336
}
@@ -375,21 +375,21 @@ - (void)iOSApplicationDidEnterBackground:(NSNotification *)notif {
375375
_isRunningInBackground = YES;
376376

377377
NSNotificationCenter *notifCenter = [NSNotificationCenter defaultCenter];
378-
GDTCORLogDebug("%@", @"GDTCORPlatform is sending a notif that the app is backgrounding.");
378+
GDTCORLogDebug(@"%@", @"GDTCORPlatform is sending a notif that the app is backgrounding.");
379379
[notifCenter postNotificationName:kGDTCORApplicationDidEnterBackgroundNotification object:nil];
380380
}
381381

382382
- (void)iOSApplicationWillEnterForeground:(NSNotification *)notif {
383383
_isRunningInBackground = NO;
384384

385385
NSNotificationCenter *notifCenter = [NSNotificationCenter defaultCenter];
386-
GDTCORLogDebug("%@", @"GDTCORPlatform is sending a notif that the app is foregrounding.");
386+
GDTCORLogDebug(@"%@", @"GDTCORPlatform is sending a notif that the app is foregrounding.");
387387
[notifCenter postNotificationName:kGDTCORApplicationWillEnterForegroundNotification object:nil];
388388
}
389389

390390
- (void)iOSApplicationWillTerminate:(NSNotification *)notif {
391391
NSNotificationCenter *notifCenter = [NSNotificationCenter defaultCenter];
392-
GDTCORLogDebug("%@", @"GDTCORPlatform is sending a notif that the app is terminating.");
392+
GDTCORLogDebug(@"%@", @"GDTCORPlatform is sending a notif that the app is terminating.");
393393
[notifCenter postNotificationName:kGDTCORApplicationWillTerminateNotification object:nil];
394394
}
395395
#endif // TARGET_OS_IOS || TARGET_OS_TV
@@ -399,7 +399,7 @@ - (void)iOSApplicationWillTerminate:(NSNotification *)notif {
399399
#if TARGET_OS_OSX
400400
- (void)macOSApplicationWillTerminate:(NSNotification *)notif {
401401
NSNotificationCenter *notifCenter = [NSNotificationCenter defaultCenter];
402-
GDTCORLogDebug("%@", @"GDTCORPlatform is sending a notif that the app is terminating.");
402+
GDTCORLogDebug(@"%@", @"GDTCORPlatform is sending a notif that the app is terminating.");
403403
[notifCenter postNotificationName:kGDTCORApplicationWillTerminateNotification object:nil];
404404
}
405405
#endif // TARGET_OS_OSX

GoogleDataTransport/GDTCORLibrary/GDTCORReachability.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ + (SCNetworkReachabilityFlags)currentFlags {
6262
GDTCORReachability *reachability = [GDTCORReachability sharedInstance];
6363
currentFlags =
6464
reachability->_callbackFlags ? reachability->_callbackFlags : reachability->_flags;
65-
GDTCORLogDebug("Initial reachability flags determined: %d", currentFlags);
65+
GDTCORLogDebug(@"Initial reachability flags determined: %d", currentFlags);
6666
});
6767
return currentFlags;
6868
}
@@ -93,7 +93,7 @@ - (instancetype)init {
9393
dispatch_async(_reachabilityQueue, ^{
9494
Boolean valid = SCNetworkReachabilityGetFlags(self->_reachabilityRef, &self->_flags);
9595
if (!valid) {
96-
GDTCORLogDebug("%@", @"Determining reachability failed.");
96+
GDTCORLogDebug(@"%@", @"Determining reachability failed.");
9797
self->_flags = 0;
9898
}
9999
});
@@ -112,7 +112,7 @@ - (void)setCallbackFlags:(SCNetworkReachabilityFlags)flags {
112112
static void GDTCORReachabilityCallback(SCNetworkReachabilityRef reachability,
113113
SCNetworkReachabilityFlags flags,
114114
void *info) {
115-
GDTCORLogDebug("Reachability changed, new flags: %d", flags);
115+
GDTCORLogDebug(@"Reachability changed, new flags: %d", flags);
116116
[[GDTCORReachability sharedInstance] setCallbackFlags:flags];
117117
}
118118

GoogleDataTransport/GDTCORLibrary/GDTCORRegistrar.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ - (void)registerUploader:(id<GDTCORUploader>)backend target:(GDTCORTarget)target
5555
dispatch_async(_registrarQueue, ^{
5656
GDTCORRegistrar *strongSelf = weakSelf;
5757
if (strongSelf) {
58-
GDTCORLogDebug("Registered an uploader: %@ for target:%ld", backend, (long)target);
58+
GDTCORLogDebug(@"Registered an uploader: %@ for target:%ld", backend, (long)target);
5959
strongSelf->_targetToUploader[@(target)] = backend;
6060
}
6161
});
@@ -66,7 +66,7 @@ - (void)registerStorage:(id<GDTCORStorageProtocol>)storage target:(GDTCORTarget)
6666
dispatch_async(_registrarQueue, ^{
6767
GDTCORRegistrar *strongSelf = weakSelf;
6868
if (strongSelf) {
69-
GDTCORLogDebug("Registered storage: %@ for target:%ld", storage, (long)target);
69+
GDTCORLogDebug(@"Registered storage: %@ for target:%ld", storage, (long)target);
7070
strongSelf->_targetToStorage[@(target)] = storage;
7171
}
7272
});
@@ -77,7 +77,7 @@ - (void)registerPrioritizer:(id<GDTCORPrioritizer>)prioritizer target:(GDTCORTar
7777
dispatch_async(_registrarQueue, ^{
7878
GDTCORRegistrar *strongSelf = weakSelf;
7979
if (strongSelf) {
80-
GDTCORLogDebug("Registered a prioritizer: %@ for target:%ld", prioritizer, (long)target);
80+
GDTCORLogDebug(@"Registered a prioritizer: %@ for target:%ld", prioritizer, (long)target);
8181
strongSelf->_targetToPrioritizer[@(target)] = prioritizer;
8282
}
8383
});

GoogleDataTransport/GDTCORLibrary/GDTCORTransformer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ - (void)transformEvent:(GDTCOREvent *)event
6868
GDTCOREvent *transformedEvent = event;
6969
for (id<GDTCOREventTransformer> transformer in transformers) {
7070
if ([transformer respondsToSelector:@selector(transform:)]) {
71-
GDTCORLogDebug("Applying a transformer to event %@", event);
71+
GDTCORLogDebug(@"Applying a transformer to event %@", event);
7272
transformedEvent = [transformer transform:transformedEvent];
7373
if (!transformedEvent) {
7474
completion(NO, nil);

GoogleDataTransport/GDTCORLibrary/GDTCORTransport.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ - (nullable instancetype)initWithMappingID:(NSString *)mappingID
4141
_target = target;
4242
_transformerInstance = [GDTCORTransformer sharedInstance];
4343
}
44-
GDTCORLogDebug("Transport object created. mappingID:%@ transformers:%@ target:%ld", mappingID,
44+
GDTCORLogDebug(@"Transport object created. mappingID:%@ transformers:%@ target:%ld", mappingID,
4545
transformers, (long)target);
4646
return self;
4747
}

GoogleDataTransport/GDTCORLibrary/GDTCORUploadCoordinator.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ - (instancetype)init {
5050

5151
- (void)forceUploadForTarget:(GDTCORTarget)target {
5252
dispatch_async(_coordinationQueue, ^{
53-
GDTCORLogDebug("Forcing an upload of target %ld", (long)target);
53+
GDTCORLogDebug(@"Forcing an upload of target %ld", (long)target);
5454
GDTCORUploadConditions conditions = [self uploadConditions];
5555
conditions |= GDTCORUploadConditionHighPriority;
5656
[self uploadTargets:@[ @(target) ] conditions:conditions];
@@ -71,11 +71,11 @@ - (void)startTimer {
7171
dispatch_source_set_event_handler(self->_timer, ^{
7272
if (![[GDTCORApplication sharedApplication] isRunningInBackground]) {
7373
GDTCORUploadConditions conditions = [self uploadConditions];
74-
GDTCORLogDebug("%@", @"Upload timer fired");
74+
GDTCORLogDebug(@"%@", @"Upload timer fired");
7575
[self uploadTargets:[self.registrar.targetToUploader allKeys] conditions:conditions];
7676
}
7777
});
78-
GDTCORLogDebug("%@", @"Upload timer started");
78+
GDTCORLogDebug(@"%@", @"Upload timer started");
7979
dispatch_resume(self->_timer);
8080
});
8181
}
@@ -100,7 +100,7 @@ - (void)uploadTargets:(NSArray<NSNumber *> *)targets conditions:(GDTCORUploadCon
100100
for (NSNumber *target in targets) {
101101
// Don't trigger uploads for targets that have an in-flight package already.
102102
if (self->_targetToInFlightPackages[target]) {
103-
GDTCORLogDebug("Target %@ will not upload, there's an upload in flight", target);
103+
GDTCORLogDebug(@"Target %@ will not upload, there's an upload in flight", target);
104104
continue;
105105
}
106106
// Ask the uploader if they can upload and do so, if it can.
@@ -111,14 +111,14 @@ - (void)uploadTargets:(NSArray<NSNumber *> *)targets conditions:(GDTCORUploadCon
111111
conditions:conditions];
112112
if (package.events.count) {
113113
self->_targetToInFlightPackages[target] = package;
114-
GDTCORLogDebug("Package of %ld events is being handed over to an uploader",
114+
GDTCORLogDebug(@"Package of %ld events is being handed over to an uploader",
115115
(long)package.events.count);
116116
[uploader uploadPackage:package];
117117
} else {
118118
[package completeDelivery];
119119
}
120120
}
121-
GDTCORLogDebug("Target %@ is not ready to upload", target);
121+
GDTCORLogDebug(@"Target %@ is not ready to upload", target);
122122
}
123123
});
124124
}

0 commit comments

Comments
 (0)