diff --git a/ios/Video/Features/RCTResourceLoaderDelegate.swift b/ios/Video/Features/RCTResourceLoaderDelegate.swift index e1f11528..52228517 100644 --- a/ios/Video/Features/RCTResourceLoaderDelegate.swift +++ b/ios/Video/Features/RCTResourceLoaderDelegate.swift @@ -44,7 +44,7 @@ class RCTResourceLoaderDelegate: NSObject, AVAssetResourceLoaderDelegate, URLSes } func resourceLoader(_ resourceLoader:AVAssetResourceLoader, didCancel loadingRequest:AVAssetResourceLoadingRequest) { - NSLog("didCancelLoadingRequest") + RCTLog("didCancelLoadingRequest") } func setLicenseResult(_ license:String!) { diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index b5d46cb4..be1c0981 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -1076,7 +1076,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH let newRect = change.newValue if !oldRect!.equalTo(newRect!) { if newRect!.equalTo(UIScreen.main.bounds) { - NSLog("in fullscreen") + RCTLog("in fullscreen") self.reactViewController().view.frame = UIScreen.main.bounds self.reactViewController().view.setNeedsLayout() diff --git a/ios/Video/RCTVideoSwiftLog/RCTVideoSwiftLog.swift b/ios/Video/RCTVideoSwiftLog/RCTVideoSwiftLog.swift index 99ca8e8a..0e0e1697 100644 --- a/ios/Video/RCTVideoSwiftLog/RCTVideoSwiftLog.swift +++ b/ios/Video/RCTVideoSwiftLog/RCTVideoSwiftLog.swift @@ -25,29 +25,31 @@ * way into one or the other eventually. Feel free to reuse it as desired. */ +let logHeader: String = "RNV:" + func RCTLogError(_ message: String, _ file: String=#file, _ line: UInt=#line) { - RCTVideoSwiftLog.error(message, file: file, line: line) + RCTVideoSwiftLog.error(logHeader + message, file: file, line: line) } func RCTLogWarn(_ message: String, _ file: String=#file, _ line: UInt=#line) { - RCTVideoSwiftLog.warn(message, file: file, line: line) + RCTVideoSwiftLog.warn(logHeader + message, file: file, line: line) } func RCTLogInfo(_ message: String, _ file: String=#file, _ line: UInt=#line) { - RCTVideoSwiftLog.info(message, file: file, line: line) + RCTVideoSwiftLog.info(logHeader + message, file: file, line: line) } func RCTLog(_ message: String, _ file: String=#file, _ line: UInt=#line) { - RCTVideoSwiftLog.log(message, file: file, line: line) + RCTVideoSwiftLog.log(logHeader + message, file: file, line: line) } func RCTLogTrace(_ message: String, _ file: String=#file, _ line: UInt=#line) { - RCTVideoSwiftLog.trace(message, file: file, line: line) + RCTVideoSwiftLog.trace(logHeader + message, file: file, line: line) } func DebugLog(_ message: String) { #if DEBUG - print(message) + print(logHeader + message) #endif } diff --git a/ios/VideoCaching/RCTVideoCache.m b/ios/VideoCaching/RCTVideoCache.m index 1a2b83a5..05ad65d4 100644 --- a/ios/VideoCaching/RCTVideoCache.m +++ b/ios/VideoCaching/RCTVideoCache.m @@ -30,7 +30,7 @@ options.useDirectorySeparation = NO; #ifdef DEBUG options.debugOutput = ^(NSString *string) { - NSLog(@"Video Cache: %@", string); + RCTLog(@"Video Cache: %@", string); }; #endif [self createTemporaryPath]; @@ -48,7 +48,7 @@ error:&error]; #ifdef DEBUG if (!success || error) { - NSLog(@"Error while! %@", error); + RCTLog(@"Error while! %@", error); } #endif } @@ -64,7 +64,7 @@ [self.videoCache storeData:data forKey:key locked:NO withCallback:^(SPTPersistentCacheResponse * _Nonnull response) { if (response.error) { #ifdef DEBUG - NSLog(@"An error occured while saving the video into the cache: %@", [response.error localizedDescription]); + RCTLog(@"An error occured while saving the video into the cache: %@", [response.error localizedDescription]); #endif handler(NO); return;