Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Feature Request: Support crash log API #307

Closed
toddanglin opened this issue Mar 10, 2017 · 4 comments
Closed

Feature Request: Support crash log API #307

toddanglin opened this issue Mar 10, 2017 · 4 comments

Comments

@toddanglin
Copy link

I know the docs currently state that the Firebase Crash API is not fully supported, but I wanted to add a vote of interest to see this support added.

Specifically, I'd like to be able to use Firebase for a custom TraceWriter so I can log production error messages to Firebase. I started to go down the path of doing this with Firebase Analytics, but it seems it would be more "correct" to use the Crash API for logging this kind of information.

Ideally, the common API for iOS/Android would look something like this:

firebase.log("Message to log to Crash API goes here");

Any idea what it might require to enable this in the plugin?

@EddyVerbruggen
Copy link
Owner

Thanks for the suggestion! I'll take a look soon. In the past manually logging was crashy but that's quite a few SDK releases ago so things may currently behave well.

@toddanglin
Copy link
Author

Taking a closer look at the Firebase API, it seems this would only be possible to support on Android today. The Firebase iOS SDK does not yet seem to support arbitrary logging. You can only create log messages that will be sent along when the next actual crash occurs.

I also noticed FIRCrashLog does not show-up in the NativeScript global namespace even with the appropriate Firebase/Crash pod loaded. Not sure why.

In either case, seems I'll have to look for a different solution for now. What are people using today capture/log production app exceptions?

@EddyVerbruggen EddyVerbruggen added this to the 3.10.2 milestone Mar 12, 2017
@jlooper
Copy link
Contributor

jlooper commented Mar 12, 2017 via email

@EddyVerbruggen
Copy link
Owner

Hey Todd, I noticed the same when working on this for iOS today - at runtime FIRCrashLog isn't available either. Most likely because of the way that Pod exposes its functions. Smells like something that needs to be reported to {N}.

I've now 'silently' added sendCrashLog to the plugin (see the TS definition file), but as it only works on Android I won't recommend using it. Also because it doesn't seem to fit your usecase anyway.

I'd recommend just using the database functions to add logging; create a /log branch in your DB and structure it any way you like. The good thing about that approach is it's actually realtime and offline available as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants