add instrumentation for @killeramoeba problem. send logs to crashlytics

This commit is contained in:
geeksville
2020-04-12 09:50:54 -07:00
parent 873eb0ca18
commit 1a6cebb07e
2 changed files with 11 additions and 1 deletions

View File

@@ -27,6 +27,16 @@ class MeshUtilApplication : GeeksvilleApplication() {
Exceptions.reporter = { exception, _, _ ->
crashlytics.recordException(exception)
}
if (isAnalyticsAllowed) {
val standardLogger = Logging.printlog
// send all log messages through crashyltics, so if we do crash we'll have those in the report
Logging.printlog = { level, tag, message ->
crashlytics.log("$tag: $message")
standardLogger(level, tag, message)
}
}
}
Mapbox.getInstance(this, getString(R.string.mapbox_access_token))