wizpanda / cordova-plugin-firebase-lib

This repository is moving & merging to https://github.com/wizpanda/cordova-plugin-firebase-lib to avoid confusion to developers.
https://www.wizpanda.com/
MIT License
68 stars 38 forks source link

Fixed crash logging on iOS, added ability to log JS stack traces. #8

Closed distinctdan closed 5 years ago

distinctdan commented 5 years ago

Hi, I've done these fixes for my own project and wanted to make them available to others as well.

charpour commented 5 years ago

I'd love to have this functionality !

sagrawal31 commented 5 years ago

@distinctdan I see you rebased the master. But we will get this merged once we fix the issue of the breaking change due to Firebase.

sagrawal31 commented 5 years ago

@distinctdan I have merged your PR and made some changes to your code at https://github.com/wizpanda/cordova-plugin-firebase-lib/commit/bfd4bf60f0722e8186a82d53880f17698c38f93f to make it more readable and DRY.

Also, instead of mixing the same method, I have created a new method logJSError which makes it more readable and backward compatible for the users.

Please let me know your thoughts.

distinctdan commented 5 years ago

@sagrawal31 Thanks for looking into it. However, I see some issues with your changes, and it looks like you didn't test enough before you merged because you've got typos and you broke functionality. Here are my observations:

distinctdan commented 5 years ago

Oh, one other thing I forgot to do, after we get everything straightened out, we'll need to update the docs to reflect the changes.

sagrawal31 commented 5 years ago

I agree with the points you mentioned. It's true that I didn't enough and only did the sanity checks but I believed the PR coming to repositories are testing enough.

But yeah, I should have tested it thoroughly after the changes. But thanks for pointing those out. I'll make the necessary changes.

charpour commented 5 years ago

Oh, one other thing I forgot to do, after we get everything straightened out, we'll need to update the docs to reflect the changes.

Couldn't agree more that DOCs are equally important

sagrawal31 commented 5 years ago

@distinctdan https://github.com/wizpanda/cordova-plugin-firebase-lib/pull/21

distinctdan commented 5 years ago

@sagrawal31 Looks great, thanks for taking a look at it. I've also done another PR to add an example to the docs of how to use StackTrace.js to pass a stacktrace to the method: https://github.com/wizpanda/cordova-plugin-firebase-lib/pull/22