diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index e4003f5..1d1dee6 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -521,6 +521,18 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { } } + /** + * Clears Instabug internal log + */ + @ReactMethod + public void clearLogs() { + try { + InstabugLog.clearLogs(); + } catch (Exception e) { + e.printStackTrace(); + } + } + private Locale getLocaleByKey(String instabugLocale) { String localeInLowerCase = instabugLocale.toLowerCase(); switch (localeInLowerCase) { diff --git a/index.js b/index.js index 4744b90..8e0cf52 100644 --- a/index.js +++ b/index.js @@ -612,6 +612,16 @@ module.exports = { } }, + /** + * Clears Instabug internal log + * + */ + clearLogs(){ + if (Platform.OS === 'android') { + Instabug.clearLogs(); + } + }, + /** * The event used to invoke the feedback form * @readonly