How can we log errors in firebase (android, kotlin)?

Viewed 252

I'm able to fire many events using firebase, how can I log an error which can appear in the below orange background?

I tried crashing the application.

I tried overriding firebase_error and app_exception events

mFirebaseAnalytics?.logEvent("firebase_error", bundle)
mFirebaseAnalytics?.logEvent("app_exception", bundle)

Didn't find any firebase error logging event as well, only thing to log any event is this

mFirebaseAnalytics?.logEvent(string, bundle)

enter image description here

1 Answers

You can put errors as exceptions into Firebase Crashlytics instead of Firebase Analytics and they will appear as non-fatal.

Firebase.crashlytics.recordException(exception)
Related