Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logging using Crashlytics

Tags:

I am using multiple Crashlytics.log() commands, for example:

Crashlytics.log("This is message 1"); Crashlytics.log("This is message 2");  

But when there is a crash in the dashboard I can only see "This is message 1" but not "This is message 2". Does Crashlytics log only show the first log not any subsequent log after that or am I doing anything wrong? How can I use multiple Crashlytics.log() commands.

like image 392
user3424346 Avatar asked Mar 15 '14 22:03

user3424346


People also ask

How do I access Crashlytics logs?

Crashlytics associates the logs with your crash data and displays them in the Crashlytics page of the Firebase console, under the Logs tab.

How do I log exception in Crashlytics?

You can also use Crashlytics below features to provide more information. Logging Non-Fatal Events: try { myMethodThatThrows(); } catch (Exception e) { Crashlytics. logException(e); // handle your exception here! }

Is Crashlytics deprecated?

We are writing to let you know that the Fabric Crashlytics SDK is now deprecated and will continue reporting your app's crashes until November 15, 2020. After this date, the Fabric Crashlytics SDK and beta versions of the Firebase Crashlytics SDK will stop sending crash reports for your app.


2 Answers

The log message will be saved with the exception. So the Crashlytics.log("1"); wont do anything without an exception.

You should fire like that:

Crashlytics.log(Log.ERROR, "YourTAG", "YourMessage"); Crashlytics.logException(new Throwable("YourERROR")); 
like image 195
xnagyg Avatar answered Oct 08 '22 06:10

xnagyg


I am using the Crashlytics log system and I can see more that one log. In fact I can see all the logs that I've added to the app before the crash point.

My guess is that your app has a crash before your "message 2" log line.

like image 22
PedroDuran Avatar answered Oct 08 '22 04:10

PedroDuran