OSDN Git Service

デバッグ用ログ出力を変更
authormasakih <masakih@users.sourceforge.jp>
Mon, 12 Oct 2015 01:12:33 +0000 (10:12 +0900)
committermasakih <masakih@users.sourceforge.jp>
Mon, 12 Oct 2015 01:12:33 +0000 (10:12 +0900)
APIの時のみ出力するように変更
API名を出力するように変更

KCD/HMJSONReciever.m

index cb5bc35..6dd79b6 100644 (file)
 
 //- (void)customHTTPProtocol:(CustomHTTPProtocol *)protocol logWithFormat:(NSString *)format arguments:(va_list)argList
 //{
-//     [[NSApp delegate] logLineReturn:@"%@", [[NSString alloc] initWithFormat:format arguments:argList]];
+//     NSURL *url = protocol.request.URL;
+//     NSString *path = url.path;
+//     NSArray *pathComponents = [path pathComponents];
+//     if(![pathComponents containsObject:@"kcsapi"]) {
+//             return;
+//     }
+//     NSString *log = [[NSString alloc] initWithFormat:format arguments:argList];
+//     log = [NSString stringWithFormat:@"API: %@,Description: %@", path.lastPathComponent, log];
+//     [[NSApp delegate] logLineReturn:@"%@", log];
 //}