From 45c70292e64745d4ebe3806b7d12b64fa49244f6 Mon Sep 17 00:00:00 2001 From: Blake Watters Date: Tue, 19 Feb 2013 12:39:40 -0500 Subject: [PATCH] Adjust `RKSearchIndexer` logging to ensure output is emitted when the indexer hits 100% --- Code/Search/RKSearchIndexer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Search/RKSearchIndexer.m b/Code/Search/RKSearchIndexer.m index d807394e4d..a734344bbc 100644 --- a/Code/Search/RKSearchIndexer.m +++ b/Code/Search/RKSearchIndexer.m @@ -258,7 +258,7 @@ - (void)indexChangedObjectsInManagedObjectContext:(NSManagedObjectContext *)mana if ([indexedIDs containsObject:[managedObject objectID]]) return; [indexedIDs addObject:[managedObject objectID]]; double percentage = (((float)[indexedIDs count]) / (float)totalObjects) * 100; - if ([indexedIDs count] % 250 == 0) RKLogInfo(@"Indexing object %ld of %ld (%.2f%% complete)", (unsigned long) [indexedIDs count], (unsigned long) totalObjects, percentage); + if ([indexedIDs count] % 250 == 0 || percentage >= 100.0) RKLogInfo(@"Indexing object %ld of %ld (%.2f%% complete)", (unsigned long) [indexedIDs count], (unsigned long) totalObjects, percentage); }]; }