Reporting logcat output to Firebase upon crash

295 Views Asked by At

I'm looking to improve and get better insights into the apps behaviour right before a crash. In the production we have a lot of Timber.d and Log.XX calls issued but it is not possible to currently see the full application's log-stack in Firebase Crashlytics section. We only see the stacktrace of the crash as well as all the custom Firebase events that have been called.

Can someone advise on any feasible methods of forcing the application to submit the full log-stack upon a crash such that it would also be visible in Firebase?

1

There are 1 best solutions below

0
Frank van Puffelen On

There is no way to post full log files to Crashlytics.

What you can do:

  • Log events with Analytics at key points in your app's flow, which will then also show up (as a sort of breadcrumb) in your Crashlytics views by adding custom keys.
  • Write custom log messages for key points in your code leading up to the crash.
  • Set a user ID for your app instance, and then write the log file to another cloud based storage location (like Cloud Storage, for which there's also a Firebase SDK) with that same user id, after the app is restarted.