Question

I have Crashlytics properly configured in my app. I can see crash reports.

I tried to add a custom log to the crash reports but I do not see anything in the report. I tried to move the log out of the uncaughtException handler and in that case I see the logs.

So if I log while the application is running properly then I see the logs in the crash report when the application crashes but if I try to add a log in my uncaughtException handler these logs are not shown.

is this the proper behaviour?

I'm on Android.

To log I just use:

    Crashlytics.log(myLog);

myLog is a non-null non-empty string (I checked it)

Was it helpful?

Solution 2

I thought that an explanation could be that the logs are sent to the server asynchronously and if the application gets killed before they are sent you don't see them in the crash report. I checked and that is not the case: even if you wait for a while before calling the default handler nothing happen.

The only explanation for now is that Crashlitycs uncaughtException handler is called before mine.

So to fix the issue it is enough to register the handler after calling Crashlytics.start

OTHER TIPS

You are right you need to move the Crashlitycs.start before registering your uncaughtException handler.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top