From 48557a19ecc02414a71ac34a9a4c33080fb2d812 Mon Sep 17 00:00:00 2001 From: Jonathan Willing Date: Mon, 13 May 2013 23:16:58 -0500 Subject: remove extra logging, switch to MCLog for remaining logs --- example/ios/iOS UI Test/iOS UI Test/MCOCIDURLProtocol.mm | 8 +------- example/ios/iOS UI Test/iOS UI Test/MCOMessageView.mm | 9 ++------- example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm | 10 ++++------ 3 files changed, 7 insertions(+), 20 deletions(-) (limited to 'example') diff --git a/example/ios/iOS UI Test/iOS UI Test/MCOCIDURLProtocol.mm b/example/ios/iOS UI Test/iOS UI Test/MCOCIDURLProtocol.mm index f07dbc0f..f0f47182 100755 --- a/example/ios/iOS UI Test/iOS UI Test/MCOCIDURLProtocol.mm +++ b/example/ios/iOS UI Test/iOS UI Test/MCOCIDURLProtocol.mm @@ -82,8 +82,6 @@ - (void) startLoading { - //NSLog(@"waiting for %p %@", self, [self _partUniqueID]); - //NSLog(@"%@", [self request]); if ([self _data] != NULL) { [[self class] partDownloadedMessage:[self _message] partUniqueID:[self _partUniqueID] data:[self _data]]; } @@ -93,7 +91,6 @@ { NSDictionary * userInfo = [notification userInfo]; - //NSLog(@"downloaded?"); NSString * notifPartID = [userInfo objectForKey:@"PartUniqueID"]; MCOAbstractMessage * notifMessage = [userInfo objectForKey:@"Message"]; if (notifMessage != [self _message]) { @@ -102,9 +99,7 @@ if (![[self _partUniqueID] isEqualToString:notifPartID]) { return; } - - //NSLog(@"downloaded2 %p %@", self, notifPartID); - + NSData * data = [userInfo objectForKey:@"Data"]; NSURLResponse * response = [[NSURLResponse alloc] initWithURL:[[self request] URL] MIMEType:@"application/data" expectedContentLength:[data length] textEncodingName:nil]; @@ -141,7 +136,6 @@ [userInfo setObject:data forKey:@"Data"]; } [[NSNotificationCenter defaultCenter] postNotificationName:MCOCIDURLProtocolDownloadedNotification object:nil userInfo:userInfo]; - //NSLog(@"downloaded %p %@", self, partUniqueID); } @end diff --git a/example/ios/iOS UI Test/iOS UI Test/MCOMessageView.mm b/example/ios/iOS UI Test/iOS UI Test/MCOMessageView.mm index 0ba10ade..941a6703 100755 --- a/example/ios/iOS UI Test/iOS UI Test/MCOMessageView.mm +++ b/example/ios/iOS UI Test/iOS UI Test/MCOMessageView.mm @@ -89,11 +89,9 @@ content = nil; MCAssert(0); } - } - NSLog(@"%s",__PRETTY_FUNCTION__); - + } if (content == nil) { - [_webView loadHTMLString:@"" baseURL:/*[NSURL URLWithString:urlString]*/nil]; + [_webView loadHTMLString:@"" baseURL:nil]; return; } @@ -106,7 +104,6 @@ - (void) _loadImages { - NSLog(@"%s",__PRETTY_FUNCTION__); NSString * result = [_webView stringByEvaluatingJavaScriptFromString:@"findCIDImageURL()"]; NSData * data = [result dataUsingEncoding:NSUTF8StringEncoding]; NSError *error = nil; @@ -181,8 +178,6 @@ NSURLRequest *responseRequest = [self webView:webView resource:nil willSendRequest:request redirectResponse:nil fromDataSource:nil]; - //NSLog(@"responseRequest:%@", responseRequest); - if(responseRequest == request) { return YES; } else { diff --git a/example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm b/example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm index 43499d9e..aeca9384 100755 --- a/example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm +++ b/example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm @@ -69,7 +69,7 @@ - (void) setMessage:(MCOIMAPMessage *)message { - if (mailcore::logEnabled) NSLog(@"set message : %@", message); + MCLog("set message : %s", message.description.UTF8String); for(MCOOperation * op in _ops) { [op cancel]; } @@ -88,7 +88,7 @@ - (MCOIMAPFetchContentOperation *) _fetchIMAPPartWithUniqueID:(NSString *)partUniqueID folder:(NSString *)folder { - if (mailcore::logEnabled) NSLog(@"%@ is missing, fetching", partUniqueID); + MCLog("%s is missing, fetching", partUniqueID.description.UTF8String); if ([_pending containsObject:partUniqueID]) { return NULL; @@ -111,7 +111,7 @@ [_ops removeObject:op]; [_storage setObject:data forKey:partUniqueID]; [_pending removeObject:partUniqueID]; - if (mailcore::logEnabled) NSLog(@"downloaded %@", partUniqueID); + MCLog("downloaded %s", partUniqueID.description.UTF8String); [self _callbackForPartUniqueID:partUniqueID error:nil]; }]; @@ -125,11 +125,9 @@ typedef void (^DownloadCallback)(NSError * error); { NSArray * blocks; blocks = [_callbacks objectForKey:partUniqueID]; - if (mailcore::logEnabled) NSLog(@"%@", blocks); for(DownloadCallback block in blocks) { block(error); } - if (mailcore::logEnabled) NSLog(@"done: %@", blocks); } - (NSString *) MCOMessageView_templateForAttachment:(MCOMessageView *)view @@ -199,7 +197,7 @@ typedef void (^DownloadCallback)(NSError * error); { MCOIMAPFetchContentOperation * op = [self _fetchIMAPPartWithUniqueID:partUniqueID folder:_folder]; [op setProgress:^(unsigned int current, unsigned int maximum) { - if (mailcore::logEnabled) NSLog(@"progress content: %u/%u", current, maximum); + MCLog("progress content: %u/%u", current, maximum); }]; [_ops addObject:op]; if (downloadFinished != NULL) { -- cgit v1.2.3