touchlab / Kermit

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

adding set custom value feature to crashlytics log writer #308

Closed kartik-prakash closed 1 year ago

kartik-prakash commented 1 year ago

Added setCustomValue() function to CrashlyticsLogWriter.

This will allow the clients to use kermit for their logs and add custom properties for crash reporting to crashlytics.

kpgalligan commented 1 year ago

Thanks for the submission. This is available with CrashKiOS. Do you need to add it to Kermit? Kermit is calling into CrashKiOS so adding it to the LogWriter seems unnecessary.

CrashlyticsKotlin.setCustomValue("someKey", "someValue")

https://github.com/touchlab/CrashKiOS#crashlytics-usage

kartik-prakash commented 1 year ago

Thanks for the submission. This is available with CrashKiOS. Do you need to add it to Kermit? Kermit is calling into CrashKiOS so adding it to the LogWriter seems unnecessary.

CrashlyticsKotlin.setCustomValue("someKey", "someValue")

https://github.com/touchlab/CrashKiOS#crashlytics-usage

@kpgalligan That's what we are doing for now but it seems like kermit itself doesn't expose CrashKiOS so we had to bring that dependency separately but we still end up creating two different instances one: CrashlyticsLogger for kermit and one using CrashKiOS's enableCrashlytics() which is okay as I checked at the end, everything is delegated to the singleton instance of Firebase.

samhill303 commented 1 year ago

Thanks for the input. We've decided not to make this change in Kermit as it is available in CrashKiOS