Adding custom logs and keys

Adding custom logs is super easy. It's one line of code, giving and submitting all of the information to the Firebase server about all the wrong things happening in your app.

On Android, use Crashlytics.log to help pinpoint issues.

Use the following code to perform a crash report and Log.println:

Crashlytics.log(Log.DEBUG, "YourTagGoesHere", "YourMessageGoesHere")

Use the following code to perform a crash report only:

Crashlytics.log("YourMessageGoesHere")

You can also add your own keys. Custom keys help you get the specific state of your app leading up to a crash. You can associate arbitrary key/value pairs with your crash reports, and see them in the Firebase console.

There are five methods to set keys. Each ...

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.