Merge pull request #3018 from iFeelSmart/chore/review_ios_logs
chore: review logs & add RNV prefix for easier filtering
This commit is contained in:
commit
947fa90634
@ -44,7 +44,7 @@ class RCTResourceLoaderDelegate: NSObject, AVAssetResourceLoaderDelegate, URLSes
|
|||||||
}
|
}
|
||||||
|
|
||||||
func resourceLoader(_ resourceLoader:AVAssetResourceLoader, didCancel loadingRequest:AVAssetResourceLoadingRequest) {
|
func resourceLoader(_ resourceLoader:AVAssetResourceLoader, didCancel loadingRequest:AVAssetResourceLoadingRequest) {
|
||||||
NSLog("didCancelLoadingRequest")
|
RCTLog("didCancelLoadingRequest")
|
||||||
}
|
}
|
||||||
|
|
||||||
func setLicenseResult(_ license:String!) {
|
func setLicenseResult(_ license:String!) {
|
||||||
|
@ -1076,7 +1076,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
|||||||
let newRect = change.newValue
|
let newRect = change.newValue
|
||||||
if !oldRect!.equalTo(newRect!) {
|
if !oldRect!.equalTo(newRect!) {
|
||||||
if newRect!.equalTo(UIScreen.main.bounds) {
|
if newRect!.equalTo(UIScreen.main.bounds) {
|
||||||
NSLog("in fullscreen")
|
RCTLog("in fullscreen")
|
||||||
|
|
||||||
self.reactViewController().view.frame = UIScreen.main.bounds
|
self.reactViewController().view.frame = UIScreen.main.bounds
|
||||||
self.reactViewController().view.setNeedsLayout()
|
self.reactViewController().view.setNeedsLayout()
|
||||||
|
@ -25,29 +25,31 @@
|
|||||||
* way into one or the other eventually. Feel free to reuse it as desired.
|
* 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) {
|
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) {
|
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) {
|
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) {
|
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) {
|
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) {
|
func DebugLog(_ message: String) {
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
print(message)
|
print(logHeader + message)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
options.useDirectorySeparation = NO;
|
options.useDirectorySeparation = NO;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
options.debugOutput = ^(NSString *string) {
|
options.debugOutput = ^(NSString *string) {
|
||||||
NSLog(@"Video Cache: %@", string);
|
RCTLog(@"Video Cache: %@", string);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
[self createTemporaryPath];
|
[self createTemporaryPath];
|
||||||
@ -48,7 +48,7 @@
|
|||||||
error:&error];
|
error:&error];
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!success || error) {
|
if (!success || error) {
|
||||||
NSLog(@"Error while! %@", error);
|
RCTLog(@"Error while! %@", error);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@
|
|||||||
[self.videoCache storeData:data forKey:key locked:NO withCallback:^(SPTPersistentCacheResponse * _Nonnull response) {
|
[self.videoCache storeData:data forKey:key locked:NO withCallback:^(SPTPersistentCacheResponse * _Nonnull response) {
|
||||||
if (response.error) {
|
if (response.error) {
|
||||||
#ifdef DEBUG
|
#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
|
#endif
|
||||||
handler(NO);
|
handler(NO);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user