启用调试日志记录Firebase分析 [英] Enable debug logging firebase analytics

查看:502
本文介绍了启用调试日志记录Firebase分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Android Studio中启用Firebase分析的调试日志记录功能。我尝试了按照这里找到的说明,仍然没有看到我期望的日志:



当我运行Android Studio中的终端中的链接(和上面显示的)中描述的命令时,这是我看到的输出:

  ---------系统开始
---------开始碰撞
--- ------主开始
05-19 20:14:12.794 I / FA(3083):应用测量正在启动,版本:9080
05-19 20:14:12.794 I / FA(3083):启用调试日志运行:adb shell setprop log.tag.FA VERBOSE

这就是logcat中的Android监视器选项卡所显示的内容:

  05-19 20:14:12.794 3083-3083 / com.nick.app I / FA:应用程序测量正在启动,版本:9080 
05-19 20:14:12.794 3083-3083 / com.nick.app I / FA:启用调试日志记录运行:adb shell setprop log.tag.FA VERBOSE

我期望看到的是指示我记录的各种事件被正确记录。我已经在Firebase开发者控制台中看到了他们,这让我相信我已经正确实施了他们,我只是想知道更快的方式来进行测试。

需要采取哪些步骤才能正确查看Firebase分析调试日志?

解决方案请确保运行 adb shell setprop log.tag.FA VERBOSE ,然后重新启动应用程序。启用日志仅适用于将来的日志。如果您有多台设备或仿真器连接到计算机,您可能需要告诉adb您正在为其设置哪个设备。您可以使用 adb shell getprop 来读取当前的adb属性。您应该看到 log.tag.FA 属性设置为 VERBOSE 。一旦设置了 log.tag.FA 属性,它将一直持续下去,直到你重新启动设备,所以你只需要在设备重新启动后执行一次。


I'm trying to enable debug logging for Firebase analytics in Android Studio. I have tried following the instructions found here and still don't see the logs I expect: https://firebase.google.com/docs/analytics/android/events#log_events

When I run the commands described in the link (and shown above) in the terminal within Android Studio this is the output I see:

--------- beginning of system
--------- beginning of crash
--------- beginning of main
05-19 20:14:12.794 I/FA      ( 3083): App measurement is starting up, version: 9080
05-19 20:14:12.794 I/FA      ( 3083): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE

and this is what is shown in the Android Monitor tab in logcat:

05-19 20:14:12.794 3083-3083/com.nick.app I/FA: App measurement is starting up, version: 9080
05-19 20:14:12.794 3083-3083/com.nick.app I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE

What I expect to see is an indication the various "events" I have logged are logged correctly. I have seen them in the firebase developer console which leads me to believe I have implemented them properly, I would just like a quicker way to know for testing purposes.

What steps need to be taken to properly view the firebase analytics debug logs?

解决方案

Make sure you run the adb shell setprop log.tag.FA VERBOSE and then you restart the app. Enabling logs only works for future logs. If you have more then one device or emulator attached to the computer you might need to tell adb which one you are setting the property for. You can read the current adb properties with adb shell getprop. You should see log.tag.FA property set to VERBOSE. Once you set the log.tag.FA property it will persist until you restart the device so you only need to do that once after the device reboots.

这篇关于启用调试日志记录Firebase分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆