mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-03 06:30:41 +00:00
✨ Report console logs with log levels.
This commit is contained in:
parent
42457643c2
commit
5d4c58cbdd
@ -355,25 +355,25 @@ RCT_EXPORT_METHOD(isRunningLive:(RCTResponseSenderBlock)callback) {
|
|||||||
@"invocationEventTwoFingersSwipeLeft": @(IBGInvocationEventTwoFingersSwipeLeft),
|
@"invocationEventTwoFingersSwipeLeft": @(IBGInvocationEventTwoFingersSwipeLeft),
|
||||||
@"invocationEventRightEdgePan": @(IBGInvocationEventRightEdgePan),
|
@"invocationEventRightEdgePan": @(IBGInvocationEventRightEdgePan),
|
||||||
@"invocationEventFloatingButton": @(IBGInvocationEventFloatingButton),
|
@"invocationEventFloatingButton": @(IBGInvocationEventFloatingButton),
|
||||||
|
|
||||||
@"invocationModeNA": @(IBGInvocationModeNA),
|
@"invocationModeNA": @(IBGInvocationModeNA),
|
||||||
@"invocationModeNewBug": @(IBGInvocationModeNewBug),
|
@"invocationModeNewBug": @(IBGInvocationModeNewBug),
|
||||||
@"invocationModeNewFeedback": @(IBGInvocationModeNewFeedback),
|
@"invocationModeNewFeedback": @(IBGInvocationModeNewFeedback),
|
||||||
@"invocationModeNewChat": @(IBGInvocationModeNewChat),
|
@"invocationModeNewChat": @(IBGInvocationModeNewChat),
|
||||||
@"invocationModeChatsList": @(IBGInvocationModeChatsList),
|
@"invocationModeChatsList": @(IBGInvocationModeChatsList),
|
||||||
|
|
||||||
@"dismissTypeSubmit": @(IBGDismissTypeSubmit),
|
@"dismissTypeSubmit": @(IBGDismissTypeSubmit),
|
||||||
@"dismissTypeCancel": @(IBGDismissTypeCancel),
|
@"dismissTypeCancel": @(IBGDismissTypeCancel),
|
||||||
@"dismissTypeAddAtttachment": @(IBGDismissTypeAddAttachment),
|
@"dismissTypeAddAtttachment": @(IBGDismissTypeAddAttachment),
|
||||||
|
|
||||||
@"reportTypeBug": @(IBGReportTypeBug),
|
@"reportTypeBug": @(IBGReportTypeBug),
|
||||||
@"reportTypeFeedback": @(IBGReportTypeFeedback),
|
@"reportTypeFeedback": @(IBGReportTypeFeedback),
|
||||||
|
|
||||||
@"rectMinXEdge": @(CGRectMinXEdge),
|
@"rectMinXEdge": @(CGRectMinXEdge),
|
||||||
@"rectMinYEdge": @(CGRectMinYEdge),
|
@"rectMinYEdge": @(CGRectMinYEdge),
|
||||||
@"rectMaxXEdge": @(CGRectMaxXEdge),
|
@"rectMaxXEdge": @(CGRectMaxXEdge),
|
||||||
@"rectMaxYEdge": @(CGRectMaxYEdge),
|
@"rectMaxYEdge": @(CGRectMaxYEdge),
|
||||||
|
|
||||||
@"localeArabic": @(IBGLocaleArabic),
|
@"localeArabic": @(IBGLocaleArabic),
|
||||||
@"localeChineseSimplified": @(IBGLocaleChineseSimplified),
|
@"localeChineseSimplified": @(IBGLocaleChineseSimplified),
|
||||||
@"localeChineseTraditional": @(IBGLocaleChineseTraditional),
|
@"localeChineseTraditional": @(IBGLocaleChineseTraditional),
|
||||||
@ -391,10 +391,10 @@ RCT_EXPORT_METHOD(isRunningLive:(RCTResponseSenderBlock)callback) {
|
|||||||
@"localeSpanish": @(IBGLocaleSpanish),
|
@"localeSpanish": @(IBGLocaleSpanish),
|
||||||
@"localeSwedish": @(IBGLocaleSwedish),
|
@"localeSwedish": @(IBGLocaleSwedish),
|
||||||
@"localeTurkish": @(IBGLocaleTurkish),
|
@"localeTurkish": @(IBGLocaleTurkish),
|
||||||
|
|
||||||
@"colorThemeLight": @(IBGColorThemeLight),
|
@"colorThemeLight": @(IBGColorThemeLight),
|
||||||
@"colorThemeDark": @(IBGColorThemeDark),
|
@"colorThemeDark": @(IBGColorThemeDark),
|
||||||
|
|
||||||
@"shakeHint": @(IBGStringShakeHint),
|
@"shakeHint": @(IBGStringShakeHint),
|
||||||
@"swipeHint": @(IBGStringSwipeHint),
|
@"swipeHint": @(IBGStringSwipeHint),
|
||||||
@"edgeSwipeStartHint": @(IBGStringEdgeSwipeStartHint),
|
@"edgeSwipeStartHint": @(IBGStringEdgeSwipeStartHint),
|
||||||
@ -452,10 +452,26 @@ RCTLogFunction InstabugReactLogFunction = ^(
|
|||||||
{
|
{
|
||||||
NSString *log = RCTFormatLog([NSDate date], level, fileName, lineNumber, message);
|
NSString *log = RCTFormatLog([NSDate date], level, fileName, lineNumber, message);
|
||||||
NSString *compeleteLog = [NSString stringWithFormat:@"Instabug - REACT LOG: %@", log];
|
NSString *compeleteLog = [NSString stringWithFormat:@"Instabug - REACT LOG: %@", log];
|
||||||
|
|
||||||
va_list arg_list;
|
va_list arg_list;
|
||||||
|
|
||||||
IBGNSLog(compeleteLog, arg_list);
|
switch(level) {
|
||||||
|
case RCTLogLevelTrace:
|
||||||
|
IBGNSLogWithLevel(compeleteLog, arg_list, IBGLogLevelTrace);
|
||||||
|
break;
|
||||||
|
case RCTLogLevelInfo:
|
||||||
|
IBGNSLogWithLevel(compeleteLog, arg_list, IBGLogLevelInfo);
|
||||||
|
break;
|
||||||
|
case RCTLogLevelWarning:
|
||||||
|
IBGNSLogWithLevel(compeleteLog, arg_list, IBGLogLevelWarning);
|
||||||
|
break;
|
||||||
|
case RCTLogLevelError:
|
||||||
|
IBGNSLogWithLevel(compeleteLog, arg_list, IBGLogLevelError);
|
||||||
|
break;
|
||||||
|
case RCTLogLevelFatal:
|
||||||
|
IBGNSLogWithLevel(compeleteLog, arg_list, IBGLogLevelFatal);
|
||||||
|
break;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user