Skip to content

Commit c64649c

Browse files
committed
✨ add mapping for the api clearLogs
1 parent c6ad953 commit c64649c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,13 @@ const InstabugModule = {
805805
}
806806
},
807807

808+
/**
809+
* Clear all Instabug logs, console logs, network logs and user steps.
810+
*/
811+
clearLogs: function() {
812+
Instabug.clearLogs();
813+
},
814+
808815
/**
809816
* Sets whether user steps tracking is visual, non visual or disabled.
810817
* User Steps tracking is enabled by default if it's available

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,10 @@ - (dispatch_queue_t)methodQueue {
481481
[IBGLog logError:log];
482482
}
483483

484+
RCT_EXPORT_METHOD(clearLogs) {
485+
[IBGLog clearAllLogs];
486+
}
487+
484488
RCT_EXPORT_METHOD(setSurveysEnabled:(BOOL)surveysEnabled) {
485489
IBGSurveys.enabled = surveysEnabled;
486490
}

0 commit comments

Comments
 (0)