Best Practices for error logging in production

Hi,

I’m looking for best practices for error logging in ionic 2 or cordova apps in general. I’m not talking about how to catch the errors on device. I think about an easy and cost efficient solution to log errors to the cloud. I thought firebase would support this but they only catch app crashes. There is a way to log custom errors, but only on android. I’m looking for a cross platform solution.

Any ideas?

Greetings

Ralf

I am also in search of same solution, @Rasioc can you mention what you came across for android, as I am in need for an Android App

See Firebase Crashlytics | A powerful Android and iOS crash reporting solution

FirebaseCrash.report(new Exception("My first Android non-fatal error"));

Seems like the used cordova plugin does not implement this method, however it should be easy to modify it and add it.

1 Like

I just wrote a tutorial on how to log errors with Sentry.

Sentry is an open source solution for tracking errors in applications. You can install Sentry on your own server and let your app send its errors there or you can use the Sentry hosted service with a free plan that tracks up to 10.000 events per month. They have paid plans if you need to track more.

4 Likes

Thanks! well written and quite clear.
However, i am still interested in alternatives.
E.g. did somebody find a solution using firebase, maybe using a simple Function and small DB?

I found a custom tracking solution: https://github.com/saloonapp/saloon-app/blob/v1/www/js/config/_log.js

Ionic Pro has nice monitoring services