@@ -184,7 +184,7 @@ - (void)start
184
184
if (self.configuration .supportCacheControl ) {
185
185
SonicCacheItem *cacheItem = [[SonicCache shareCache ] cacheForSession: self .sessionID];
186
186
if (![cacheItem isCacheExpired ]) {
187
- NSLog (@" SonicSession.start finish:session(%@ ) is under cache expired." , self.sessionID );
187
+ SonicLogEvent (@" SonicSession.start finish:session(%@ ) is under cache expired." , self.sessionID );
188
188
return ;
189
189
}
190
190
}
@@ -435,7 +435,7 @@ - (void)firstLoadDidSuccess
435
435
if (200 == self.sonicServer .response .statusCode ) {
436
436
[self dealWithFirstLoad ];
437
437
} else {
438
- NSLog (@" firstLoadDidSuccess warning:statusCode[%ld ] miss!" , (long )self.sonicServer .response .statusCode );
438
+ SonicLogEvent (@" firstLoadDidSuccess warning:statusCode[%ld ] miss!" , (long )self.sonicServer .response .statusCode );
439
439
}
440
440
441
441
[self checkAutoCompletionAction ];
@@ -464,7 +464,7 @@ - (void)dealWithFirstLoad
464
464
if (self.configuration .supportCacheControl ) {
465
465
NSString *cacheControl = [self .sonicServer responseHeaderForKey: SonicHeaderValueCacheControl];
466
466
if ([cacheControl isEqualToString: @" no-cache" ] || [cacheControl isEqualToString: @" no-store" ] || [cacheControl isEqualToString: @" must-revalidate" ]) {
467
- NSLog (@" cache control need't cache!" );
467
+ SonicLogEvent (@" cache control need't cache!" );
468
468
return ;
469
469
}
470
470
}
@@ -473,7 +473,7 @@ - (void)dealWithFirstLoad
473
473
474
474
NSDictionary *serverResult = [self .sonicServer sonicItemForCache ];
475
475
if (!serverResult) {
476
- NSLog (@" Sonic first load item for cache nil" );
476
+ SonicLogEvent (@" Sonic first load item for cache nil" );
477
477
return ;
478
478
}
479
479
@@ -668,7 +668,7 @@ - (NSDictionary *)sonicDiffResult
668
668
NSDictionary *extra = @{@" template-tag" :templateTag,@" eTag" :etag,@" isReload" :isRefresh,@" cache-offline" :cacheOffline};
669
669
[resultDict setObject: extra forKey: @" extra" ];
670
670
671
- NSLog (@" sonic diff result :%@ " ,resultDict);
671
+ SonicLogEvent (@" sonic diff result :%@ " ,resultDict);
672
672
673
673
return resultDict;
674
674
}
@@ -692,7 +692,7 @@ - (void)updateDidSuccess
692
692
{
693
693
if (![self .sonicServer isSonicResponse ]) {
694
694
[[SonicCache shareCache ] removeCacheBySessionID: self .sessionID];
695
- NSLog (@" Clear cache because while not sonic repsonse!" );
695
+ SonicLogEvent (@" Clear cache because while not sonic repsonse!" );
696
696
break ;
697
697
}
698
698
@@ -742,7 +742,7 @@ - (void)updateDidSuccess
742
742
self.webviewCallBack (resultDict);
743
743
}
744
744
}else {
745
- NSLog (@" There is no webViewCallBack!" );
745
+ SonicLogEvent (@" There is no webViewCallBack!" );
746
746
}
747
747
}
748
748
@@ -758,7 +758,7 @@ - (void)dispatchUpdateCallBack
758
758
self.updateCallBack (resultDict);
759
759
}
760
760
}else {
761
- NSLog (@" There is no updateCallBack!" );
761
+ SonicLogEvent (@" There is no updateCallBack!" );
762
762
}
763
763
}
764
764
}
@@ -845,7 +845,7 @@ - (void)preloadSubResourceWithResponseHeaders:(NSDictionary *)responseHeaders
845
845
{
846
846
NSString *linkValue = responseHeaders[SonicHeaderKeyLink];
847
847
if (linkValue.length == 0 ) {
848
- NSLog (@" no preload link exist!" );
848
+ SonicLogEvent (@" no preload link exist!" );
849
849
return ;
850
850
}
851
851
NSArray *linkArray = [linkValue componentsSeparatedByString: @" ;" ];
0 commit comments