There are two ways to log to Crashlytics according to the documentation.
Crashlytics.log(int priority, String tag, String msg);
In addition to writing to the next crash report, it will also write to the LogCat using
android.util.Log.println(priority, tag, msg)
.Crashlytics.log(msg);
which will only write to the Crashlytics crash report [not logcat].
However, this second method does not allow me to set a tag and priority. Instead it automatically sets the resulting tag as "CrashlyticsCore" and priority to debug:
From Fabric dashboard:
1 | 04:24:55:100 (UTC) | D/CrashlyticsCore ...
2 | 04:24:55:101 (UTC) | D/CrashlyticsCore ...
3 | 04:24:55:121 (UTC) | D/CrashlyticsCore ...
How can I keep my actual tag and debug value? I suppose I could create a custom message but this seems ugly and would just clutter up Fabric:
String output = String.format(Locale.US,
"Priority: %d; %s : %s", priority, tag, message);
Crashlytics.log(output);