I am using multiple Crashlytics.log()
commands, for example:
Crashlytics.log(\"This is message 1\");
Crashlytics.log(\"This is message 2\");
It seems that Crashlytics is writing the log messages asynchronously. So you will always have a race condition when using Crashlytics.log().
Depending on what you are doing a short (and ugly) sleep before crashing may solve this issue:
Crashlytics.log("1");
Crashlytics.log("2");
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// NOP: Ignored!
}
throw new RuntimeException("Failed directly after logging.");
Or you can use custom keys instead:
Crashlytics.setString("SOME_IMPORTANT_VALUE", "1");