Search code examples
androidlogcatgoogle-fabriccrashlytics-android

Fabric write Log to android logcat in addition to Fabric dashboard in Android


I am using Fabric crashlytics for crash reporting. Fabric write log to android logcat in addition to fabric dashboard. I want to disable android logcat messages, but found no such method.


Solution

  • You want to use Crashlytics.log(msg); not Crashlytics.log(int priority, String tag, String msg);.

    From the documentation

    "The recommended way to add custom logging to your app is 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). If you don’t want to write to LogCat you should call: Crashlytics.log(msg); which will only write to the Crashlytics crash report."