Skip to content

Commit 8b0bd16

Browse files
committed
Only perform NSLog statements if SD_VERBOSE is defined
1 parent e5b05c3 commit 8b0bd16

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SDWebImage/SDWebImagePrefetcher.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ - (void)startPrefetchingAtIndex:(NSUInteger)index
6363

6464
if (image)
6565
{
66+
#ifdef SD_VERBOSE
6667
NSLog(@"Prefetched %d out of %d", self.finishedCount, self.prefetchURLs.count);
68+
#endif
6769
}
6870
else
6971
{
72+
#ifdef SD_VERBOSE
7073
NSLog(@"Prefetched %d out of %d (Failed)", self.finishedCount, [self.prefetchURLs count]);
74+
#endif
7175

7276
// Add last failed
7377
self.skippedCount++;
@@ -91,8 +95,10 @@ - (void)startPrefetchingAtIndex:(NSUInteger)index
9195

9296
- (void)reportStatus
9397
{
98+
#ifdef SD_VERBOSE
9499
NSUInteger total = [self.prefetchURLs count];
95100
NSLog(@"Finished prefetching (%d successful, %d skipped, timeElasped %.2f)", total - self.skippedCount, self.skippedCount, CFAbsoluteTimeGetCurrent() - self.startedTime);
101+
#endif
96102
}
97103

98104
- (void)prefetchURLs:(NSArray *)urls

0 commit comments

Comments
 (0)