Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off Firebase logcat logging

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.

like image 801
Austyn Mahoney Avatar asked Jun 01 '16 19:06

Austyn Mahoney


People also ask

How to display Firebase logs in Android Studio using logcat?

Firebase logs displayed in Logcat with tag FA, so create a regex to hide tag FA ^ (?!.* (FA)).*$ and put that in Log Tag in Logcat Filter dialog in Android Studio. 2. Within Application Logs Sometimes we want to show the logs within the application for debug purpose. Like application has a connectivity issue with the server in some devices.

How to remove unnecessary logs from the LogCat in Android Studio?

To remove the unnecessary logs from the Logcat by creating a filter list based on the tag. We can create regex like if you want to remove Firebase log from Logcat. Firebase logs displayed in Logcat with tag FA, so create a regex to hide tag FA ^ (?!.* (FA)).*$ and put that in Log Tag in Logcat Filter dialog in Android Studio.

How do I log events in Firebase Analytics?

After you have configured the firebase.analytics () instance, you can begin to log events with the logEvent () method. If you're already familiar with Google Analytics, this method is equivalent to using the event command in gtag.js.

How to disable multiple tags in logcat?

In the logcat console dropdown on the right side, click Edit Filter Configuration In Log Tag field (Regex must be checked), enter this: ^ (?! (FA)) Done! If you want to disable multiple TAGs then use ^ (?! (EXCLUDE_TAG1|EXCLUDE_TAG2)) e.g. ^ (?! (FA|QueuedMuxer|ACodec|MPEG4Writer)) I think you have to disable every package separately.


2 Answers

You can go disable it via command line:

adb shell setprop log.tag.FA SILENT adb shell setprop log.tag.FA-SVC SILENT 
like image 125
Artem Avatar answered Nov 09 '22 06:11

Artem


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!

like image 40
dknchris Avatar answered Nov 09 '22 07:11

dknchris