39

Now that I have integrated Firebase, I don't want to see logcat spam like this

D/FirebaseCrashApiImpl: FirebaseCrash reporting API initialized
I/FirebaseCrash: FirebaseCrash reporting initialized com.google.firebase.crash.internal.zzg@e9c7537
D/FirebaseApp: Initialized class com.google.firebase.crash.FirebaseCrash.
I/FA: App measurement is starting up, version: 9080
I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE

I tried running adb shell setprop log.tag.FA ERROR, but it still keeps logging everything.

How do I turn it off in the SDK (or setprop)? Filtering it out of logcat is not the solution I am looking for.

Austyn Mahoney
  • 11,398
  • 8
  • 64
  • 85
  • 3
    First they quietly give you firebase analytics when migrating to FCM from GCM, now you cant even disable the logcats, and when you do, it resets to VERBOSE every app restart – urSus Apr 14 '18 at 17:12

3 Answers3

13

You can go disable it via command line:

adb shell setprop log.tag.FA SILENT
adb shell setprop log.tag.FA-SVC SILENT
Artem
  • 896
  • 1
  • 11
  • 16
  • 2
    @Ewan https://firebase.google.com/docs/analytics/android/events#view_events_in_the_android_studio_debug_log – Artem Feb 12 '19 at 13:32
  • Thanks. Still doesn't work for me - I run the command and then start app. In AS: `02-13 18:49:49.784 7287-7376/uk.co.xxxxxx.debug V/FA: Connecting to remote` I can use the regex filter below instead. Strange, though, the command to show debug events works fine for me – Ewan Feb 13 '19 at 18:50
6

The only way I found is to use the logcat filters in Android Studio to just hide all lines with tag FA.

  1. In the logcat console dropdown on the right side, click Edit Filter Configuration
  2. In Log Tag field (Regex must be checked), enter this: ^(?!(FA))
  3. In the Package Name field, enter your package name

Done!

dknchris
  • 487
  • 9
  • 17
  • 1
    If you want to disable multiple TAGs then use `^(?!(EXCLUDE_TAG1|EXCLUDE_TAG2))` e.g. `^(?!(FA|QueuedMuxer|ACodec|MPEG4Writer))` – Nilesh Deokar Jan 10 '19 at 08:34
-4

I think you have to disable every package separately. To turn off Firebase Crash Reporting programmatically try this

FirebaseCrash.setCrashCollectionEnabled(!BuildConfig.DEBUG);
  • 1
    This may stop reporting up to Firebase, but it does not address the logcat spam OP was trying to fix. (I tried this, it had no effect.) – MotoRidingMelon Feb 21 '18 at 03:54