Skip to content

Commit

Permalink
report non fatals to firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham1g5 committed Dec 10, 2024
1 parent d4d32c8 commit dcb80ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/org/commcare/logging/AndroidLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.commcare.android.javarosa.AndroidLogEntry;
import org.commcare.models.database.SqlStorage;
import org.commcare.util.LogTypes;
import org.commcare.utils.CrashUtil;
import org.javarosa.core.api.ILogger;
import org.javarosa.core.log.IFullLogSerializer;
Expand Down Expand Up @@ -82,4 +83,9 @@ public int logSize() {
public void halt() {
//Meh.
}

@Override
public void logException(Throwable e) {
CrashUtil.reportException(e);
}
}
6 changes: 6 additions & 0 deletions app/src/org/commcare/logging/PreInitLogger.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.commcare.logging;

import org.commcare.android.javarosa.AndroidLogEntry;
import org.commcare.utils.CrashUtil;
import org.javarosa.core.api.ILogger;
import org.javarosa.core.log.IFullLogSerializer;
import org.javarosa.core.log.StreamLogSerializer;
Expand Down Expand Up @@ -72,4 +73,9 @@ public int logSize() {
public void halt() {
// TODO Auto-generated method stub
}

@Override
public void logException(Throwable e) {
CrashUtil.reportException(e);
}
}

0 comments on commit dcb80ec

Please sign in to comment.