接入 Sentry

This commit is contained in:
juntao
2020-11-18 11:54:19 +08:00
parent a1dee46436
commit 8b22361213
7 changed files with 131 additions and 47 deletions

View File

@ -26,6 +26,8 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import io.sentry.core.Sentry;
public class AppUncaughtHandler implements UncaughtExceptionHandler {
private Context mContext;
@ -45,7 +47,9 @@ public class AppUncaughtHandler implements UncaughtExceptionHandler {
Looper.loop();
}
});
saveLocalLog(mContext, ex);
Sentry.captureException(ex);
restart(mContext);
}