chore: review logs & add RNV prefix for easier filtering
This commit is contained in:
parent
dc8c618d41
commit
d825d0e6bc
@ -44,7 +44,7 @@ class RCTResourceLoaderDelegate: NSObject, AVAssetResourceLoaderDelegate, URLSes
|
||||
}
|
||||
|
||||
func resourceLoader(_ resourceLoader:AVAssetResourceLoader, didCancel loadingRequest:AVAssetResourceLoadingRequest) {
|
||||
NSLog("didCancelLoadingRequest")
|
||||
RCTLog("didCancelLoadingRequest")
|
||||
}
|
||||
|
||||
func setLicenseResult(_ license:String!) {
|
||||
|
@ -1080,7 +1080,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()
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user