touchlab / Kermit

Kermit by Touchlab is a Kotlin Multiplatform centralized logging utility.
https://kermit.touchlab.co
Apache License 2.0
699 stars 40 forks source link

Feature Request: CrashlyticsLogWriter should allow setting the FirebaseCrashlytics instance #387

Open svenjacobs opened 7 months ago

svenjacobs commented 7 months ago

Currently CrashlyticsLogWriter uses FirebaseCrashlytics.getInstance() internally to obtain an instance of FirebaseCrashlytics. This call uses the default FirebaseApp instance.

However in our app we have multiple Firebase projects and therefore configure FirebaseApp manually in code. We need the possibility to pass in an instance of either FirebaseApp or FirebaseCrashlytics so that logs end up in the correct Firebase project.

One way could be that CrashlyticsCallsActual optionally takes this instance and that CrashlyticsCalls becomes a constructor argument of CrashlyticsLogWriter.

Note: This is written from the viewpoint of an Android application. iOS should probably receive this feature, too.