Skip to content

Commit 8fba8a5

Browse files
chore: apply pr comments
1 parent 43e76e8 commit 8fba8a5

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

android/src/test/java/com/instabug/reactlibrary/RNInstabugNetworkLoggerModuleTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,4 @@ public void testRegisterNetworkLogsListenerCalled() {
204204
internalAPMMock.verify(() -> InternalAPM._registerNetworkLogSanitizer(any()));
205205
}
206206
}
207-
208-
209-
// @Test
210-
// public void testUpdateNetworkLogSnapshotInvalidJson() {
211-
// String invalidJsonString = "{\"id\":\"testId\"";
212-
//
213-
// assertThrows(RuntimeException.class, () -> rnInstabugNetworkLoggerModule.updateNetworkLogSnapshot(invalidJsonString));
214-
// }
215207
}

src/modules/Instabug.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const handleNetworkInterceptionMode = (config: InstabugConfig) => {
192192
function handleAndroidJSInterception() {
193193
if (isNativeInterceptionFeatureEnabled && hasAPMNetworkPlugin) {
194194
shouldEnableNativeInterception = true;
195-
console.warn(
195+
Logger.warn(
196196
InstabugConstants.IBG_APM_TAG + InstabugConstants.SWITCHED_TO_NATIVE_INTERCEPTION_MESSAGE,
197197
);
198198
}
@@ -206,11 +206,11 @@ function handleAndroidNativeInterception() {
206206
if (isNativeInterceptionFeatureEnabled) {
207207
shouldEnableNativeInterception = hasAPMNetworkPlugin;
208208
if (!hasAPMNetworkPlugin) {
209-
console.error(InstabugConstants.IBG_APM_TAG + InstabugConstants.PLUGIN_NOT_INSTALLED_MESSAGE);
209+
Logger.error(InstabugConstants.IBG_APM_TAG + InstabugConstants.PLUGIN_NOT_INSTALLED_MESSAGE);
210210
}
211211
} else {
212212
shouldEnableNativeInterception = false; // rollback to use JS interceptor for APM & Core.
213-
console.error(
213+
Logger.error(
214214
InstabugConstants.IBG_APM_TAG + InstabugConstants.NATIVE_INTERCEPTION_DISABLED_MESSAGE,
215215
);
216216
}
@@ -256,7 +256,7 @@ const handleInterceptionModeForIOS = (config: InstabugConfig) => {
256256
} else {
257257
shouldEnableNativeInterception = false;
258258
NetworkLogger.setEnabled(true); // rollback to JS interceptor
259-
console.error(
259+
Logger.error(
260260
InstabugConstants.IBG_APM_TAG + InstabugConstants.NATIVE_INTERCEPTION_DISABLED_MESSAGE,
261261
);
262262
}

src/modules/NetworkLogger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export const resetNetworkListener = () => {
172172
_networkListener = null;
173173
NativeNetworkLogger.resetNetworkLogsListener();
174174
} else {
175-
console.error(
175+
Logger.error(
176176
`${InstabugConstants.IBG_APM_TAG}: The \`resetNetworkListener()\` method is intended solely for testing purposes.`,
177177
);
178178
}

0 commit comments

Comments
 (0)