Merge pull request #1276 from arielelkin/patch-2

SDWebImagePrefetcher: remove logging
This commit is contained in:
Konstantinos K. 2015-09-29 08:38:33 +03:00
commit 6a28dc7ae9
1 changed files with 0 additions and 8 deletions

View File

@ -8,10 +8,6 @@
#import "SDWebImagePrefetcher.h" #import "SDWebImagePrefetcher.h"
#if (!defined(DEBUG) && !defined (SD_VERBOSE)) || defined(SD_LOG_NONE)
#define NSLog(...)
#endif
@interface SDWebImagePrefetcher () @interface SDWebImagePrefetcher ()
@property (strong, nonatomic) SDWebImageManager *manager; @property (strong, nonatomic) SDWebImageManager *manager;
@ -65,14 +61,11 @@
if (self.progressBlock) { if (self.progressBlock) {
self.progressBlock(self.finishedCount,[self.prefetchURLs count]); self.progressBlock(self.finishedCount,[self.prefetchURLs count]);
} }
NSLog(@"Prefetched %@ out of %@", @(self.finishedCount), @(self.prefetchURLs.count));
} }
else { else {
if (self.progressBlock) { if (self.progressBlock) {
self.progressBlock(self.finishedCount,[self.prefetchURLs count]); self.progressBlock(self.finishedCount,[self.prefetchURLs count]);
} }
NSLog(@"Prefetched %@ out of %@ (Failed)", @(self.finishedCount), @(self.prefetchURLs.count));
// Add last failed // Add last failed
self.skippedCount++; self.skippedCount++;
} }
@ -101,7 +94,6 @@
- (void)reportStatus { - (void)reportStatus {
NSUInteger total = [self.prefetchURLs count]; NSUInteger total = [self.prefetchURLs count];
NSLog(@"Finished prefetching (%@ successful, %@ skipped, timeElapsed %.2f)", @(total - self.skippedCount), @(self.skippedCount), CFAbsoluteTimeGetCurrent() - self.startedTime);
if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didFinishWithTotalCount:skippedCount:)]) { if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didFinishWithTotalCount:skippedCount:)]) {
[self.delegate imagePrefetcher:self [self.delegate imagePrefetcher:self
didFinishWithTotalCount:(total - self.skippedCount) didFinishWithTotalCount:(total - self.skippedCount)